Debugging email notifications not comming through

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
dsolberg
Posts: 17
Joined: Wed Dec 10, 2014 3:37 pm

Debugging email notifications not comming through

Post 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!
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Debugging email notifications not comming through

Post by abrist »

Well, notifications are getting sent from nagios. Lets check your maillog:

Code: Select all

tail -40 /var/log/maillog
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
dsolberg
Posts: 17
Joined: Wed Dec 10, 2014 3:37 pm

Re: Debugging email notifications not comming through

Post 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!
cmerchant
Posts: 546
Joined: Wed Sep 24, 2014 11:19 am

Re: Debugging email notifications not comming through

Post by cmerchant »

Great, We'll Go Ahead And Close This Thread. cAsE mAtTerS in *nix :) Thanks.
Locked