Nagios unable to send email via sendmail
Posted: Mon Oct 22, 2018 7:25 am
All,
I am using Nagios 4.4.2 on a Debian machine and I have sendmail configured as a gmail relay. I am able to send email via the CLI, but when I go click on "Send custom host notification" to have Nagios send an email, I don't get any email and I get these errors in the Event Log:
Informational Message[10-22-2018 12:18:30] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
Informational Message[10-22-2018 12:18:30] wproc: stderr line 01: /bin/sh: 1: /bin/mail: not found
Informational Message[10-22-2018 12:18:30] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
Informational Message[10-22-2018 12:18:30] wproc: host=orangepione; service=(none); contact=roger
Informational Message[10-22-2018 12:18:30] wproc: NOTIFY job 496 from worker Core Worker 13317 is a non-check helper but exited with return code 127
Host Notification[10-22-2018 12:18:30] HOST NOTIFICATION: roger;orangepione;CUSTOM (DOWN);notify-host-by-email;(Host check timed out after 30.03 seconds);nagiosadmin;test
I have mailutils installed and when I do "which mail", I get the following:
root@ftp:~# which mail
/usr/bin/mail
It seems my mail is in /usr/bin/mail and Nagios is looking in /bin/mail, is that correect? if so, how would I fix that?
Any ideas on what I should do to fix it would be greatly appreciated.
Thanks,
Roger
I am using Nagios 4.4.2 on a Debian machine and I have sendmail configured as a gmail relay. I am able to send email via the CLI, but when I go click on "Send custom host notification" to have Nagios send an email, I don't get any email and I get these errors in the Event Log:
Informational Message[10-22-2018 12:18:30] wproc: stderr line 02: /usr/bin/printf: write error: Broken pipe
Informational Message[10-22-2018 12:18:30] wproc: stderr line 01: /bin/sh: 1: /bin/mail: not found
Informational Message[10-22-2018 12:18:30] wproc: early_timeout=0; exited_ok=1; wait_status=32512; error_code=0;
Informational Message[10-22-2018 12:18:30] wproc: host=orangepione; service=(none); contact=roger
Informational Message[10-22-2018 12:18:30] wproc: NOTIFY job 496 from worker Core Worker 13317 is a non-check helper but exited with return code 127
Host Notification[10-22-2018 12:18:30] HOST NOTIFICATION: roger;orangepione;CUSTOM (DOWN);notify-host-by-email;(Host check timed out after 30.03 seconds);nagiosadmin;test
I have mailutils installed and when I do "which mail", I get the following:
root@ftp:~# which mail
/usr/bin/mail
It seems my mail is in /usr/bin/mail and Nagios is looking in /bin/mail, is that correect? if so, how would I fix that?
Any ideas on what I should do to fix it would be greatly appreciated.
Thanks,
Roger