Page 1 of 1

Debugging email notifications not comming through

Posted: Thu Dec 18, 2014 10:06 am
by dsolberg
Greetings,

Migrated from Nagios core 3.0.3 to Nagios XI 2014R2.0 using the Nagios VM OVA deployment. Working on email notifications and noticed in the logs they are being reported, but never are delivered. I have changed the email settings to use Sendmail and have setup a relayhost in Procmail to relay off our internal email server so I can get better debug logs.

Looking at the /usr/local/nagios/var/nagios.log and noticed the following.

[1418911525] SERVICE NOTIFICATION: user1;da01;U01/app;WARNING;notify-service-by-email;/U01/app: 89%used(118625MB/133120MB) (>85%) : WARNING
[1418911525] SERVICE NOTIFICATION: user2;da01;U01/app;WARNING;notify-service-by-email;/U01/app: 89%used(118625MB/133120MB) (>85%) : WARNING
[1418911525] SERVICE NOTIFICATION: user3;da01;U01/app;WARNING;notify-service-by-email;/U01/app: 89%used(118625MB/133120MB) (>85%) : WARNING
[1418911525] SERVICE NOTIFICATION: user4;da01;U01/app;WARNING;notify-service-by-email;/U01/app: 89%used(118625MB/133120MB) (>85%) : WARNING
[1418911525] wproc: NOTIFY job 270 from worker Core Worker 17606 is a non-check helper but exited with return code 127
[1418911525] wproc: host=da01; service=U01/app; contact=user3
[1418911525] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1418911525] wproc: stderr line 01: /bin/sh: /usr/bin/mail: No such file or directory
[1418911525] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
[1418911525] wproc: NOTIFY job 270 from worker Core Worker 17605 is a non-check helper but exited with return code 127
[1418911525] wproc: host=da01; service=U01/app; contact=user2
[1418911525] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1418911525] wproc: stderr line 01: /bin/sh: /usr/bin/mail: No such file or directory
[1418911525] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
[1418911525] wproc: NOTIFY job 270 from worker Core Worker 17603 is a non-check helper but exited with return code 127
[1418911525] wproc: host=da01; service=U01/app; contact=user4
[1418911525] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1418911525] wproc: stderr line 01: /bin/sh: /usr/bin/mail: No such file or directory
[1418911525] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
[1418911525] wproc: NOTIFY job 270 from worker Core Worker 17604 is a non-check helper but exited with return code 127
[1418911525] wproc: host=da01; service=U01/app; contact=user1
[1418911525] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
[1418911525] wproc: stderr line 01: /bin/sh: /usr/bin/mail: No such file or directory

Any assistance would be appreciated!

Thanks!

Re: Debugging email notifications not comming through

Posted: Thu Dec 18, 2014 11:52 am
by abrist
Well, notifications are getting sent from nagios. Lets check your maillog:

Code: Select all

tail -40 /var/log/maillog

Re: Debugging email notifications not comming through

Posted: Thu Dec 18, 2014 12:14 pm
by dsolberg
I did resolve the issue, it appears that mailx-12.4-7.el6.x86_64 installs the mailer as /usr/bin/Mail (upper case "M"), I created a soft link as /usr/bin/mail (mail with a lower case "m"). Resolved the issue, alerts flowing.

Thanks!

Re: Debugging email notifications not comming through

Posted: Thu Dec 18, 2014 12:24 pm
by cmerchant
Great, We'll Go Ahead And Close This Thread. cAsE mAtTerS in *nix :) Thanks.