Page 2 of 2

Re: Nagios not sending alerts

Posted: Wed Jul 30, 2014 2:02 pm
by lmiltchev
What is the output of the following command?

Code: Select all

which mail
Is sendmail actually running?

Code: Select all

service sendmail status
Try:

Code: Select all

service sendmail start
or

Code: Select all

service sendmail restart

Re: Nagios not sending alerts

Posted: Wed Jul 30, 2014 2:03 pm
by tmcdonald
If you plan on using postfix I would use the .../usr/sbin/sendmail.postfix binary. You can run the "file" command to make sure it is an ELF executable.

Otherwise if you wish to use mailx, run "which mailx" and that will show you the binary's location.

Re: Nagios not sending alerts

Posted: Wed Jul 30, 2014 6:58 pm
by jbruyet
Ok, I changed the /usr/bin/mail command to /usr/sbin/postfix and then I tried sending another custom host notification. I'm getting the following message that gives me hope:

Code: Select all

Your command request was successfully submitted to Nagios for processing.

Note: It may take a while before the command is actually processed.

Done
But I never receive the message. The bottom of the Nagios log has this:

Code: Select all

[1406763948] EXTERNAL COMMAND: SEND_CUSTOM_HOST_NOTIFICATION;srv-FNW;0;nagiosadmin;Yet another test yet again
[1406763948] HOST NOTIFICATION: JobeePhone;srv-FNW;CUSTOM (UP);notify-host-by-email;PING OK - Packet loss = 0%, RTA = 0.13 ms;nagiosadmin;Yet another test yet again
[1406763949] wproc: NOTIFY job 96 from worker Core Worker 6904 is a non-check helper but exited with return code 1
[1406763949] wproc:   host=srv-FNW; service=(none); contact=JobeePhone
[1406763949] wproc:   early_timeout=0; exited_ok=1; wait_status=256; error_code=0;
I can't tell if I'm closer or just off in a different direction.

Thanks,

Joe B

Re: Nagios not sending alerts

Posted: Thu Jul 31, 2014 9:38 am
by jbruyet
Oops! Sorry for the non sequitur post -- I didn't check for a second page. I'll get back with my results.

Thanks,

Joe B

Re: Nagios not sending alerts

Posted: Thu Jul 31, 2014 9:44 am
by jbruyet
Hi lmiltchev, here are the results from your diagnostic steps:

Code: Select all

[root@Nagios jobee]# which mail
/bin/mail
[root@Nagios jobee]# service sendmail status
sendmail: unrecognized service
[root@Nagios jobee]#
For postfix all I did was a yum install. Did I miss a configuration step or two?

Thanks,

Joe B

Re: Nagios not sending alerts

Posted: Thu Jul 31, 2014 9:53 am
by jbruyet
Thank you tmcdonald! Using sendmail.postfix did the trick after I removed the -s parameter. I just ran another custom host notification check and I received my text message in about five seconds. A big hearty thank you to everyone who helped with this issue.

Thanks,

Joe B

Re: Nagios not sending alerts

Posted: Thu Jul 31, 2014 10:54 am
by tmcdonald
jbruyet wrote:Thank you tmcdonald! Using sendmail.postfix did the trick after I removed the -s parameter. I just ran another custom host notification check and I received my text message in about five seconds. A big hearty thank you to everyone who helped with this issue.
And a big hearty "You're welcome!" to you. Gonna lock this one up now.