|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| ARCHIVES - Software Questions about use, installation, or configuration of software running on SUSE Linux |
|
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hello again
Sorry to revive this thread but I am having some real trouble getting an email sent automatically from Nagios - still!! After my attempts above, I changed the command definition to pump "whoami" into a simple plain text file using Code:
define command{
****command_name****notify-rp-by-email
****command_line****whoami >> /test.log
****}
sending an email from the actual command line using Code:
whoami | mailx -A mpl -s "Test subject" user.name@thedomain.com Code:
define command{
****command_name****notify-rp-by-email
****command_line****whoami | mailx -A mpl -s "Test email subject" user.name@mydomain.com
****}
I then checked the /var/spool/mail/nagios file and saw it was stuffed with errors Quote:
Code:
account mpl {
set record=/home/nagios/+Sent
set from="nagios.admin@mydomain.com"
set smtp=192.168.100.2
}
nagios - the logged on username (eg returned from whoami) @uk-lds-nag-01 - the computer's name mydomain.local - the current domain (as entered in Yast2 > Hostname and Name Server configuration), although the computer is not actually a domain member ![]() Any ideas please? |
|
|||
|
hmm, resolved .. adding a
Code:
-r "valid.sender@mydomain.com" which is a shame, as it means i have no excuse to not do anything about the alerts
|
|
|||
|
Hello, yes, me again.
Mailx mailx mailx. So I am trying to get the following example output Quote:
I have tried to use two different commands to dump the information into an email via mailx printf echo printf - does not like % signs so half my output is missed echo - does not like newline "\n" commands so in actually get "\n" in the output!! Is there a command that will allow BOTH % and newlines? |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|