Email notification not working (sendmail)
Posted: Thu Mar 24, 2016 7:22 pm
Hi, I have installed sendmail and did the configuration with my SMTP server but email notification is not working. I am able to send emails command line with both root and nagios users. I checked the configuraion in commands.cfg file and it seems ok to me. Below logs from Nagios.log file and mail.log file.
Nagios.log -
[1458863451] HOST NOTIFICATION: nagiosadmin;Windows S1;CUSTOM (UP);notify-host-by-email;PING OK - Packet loss = 0%, RTA = 0.61 ms;Nagios Admin;Sample Custom
[1458863470] SERVICE NOTIFICATION: nagiosadmin;Windows S1;C:\ Drive Space;CRITICAL;notify-service-by-email;c:\ - total: 63.66 Gb - used: 61.75 Gb (97%) - free 1.90 Gb (3%)
[1458863478] HOST ALERT: NWPrinter1;DOWN;SOFT;7;PING CRITICAL - Packet loss = 100%
[1458863481] wproc: Core Worker 1205: job 22 (pid=5746) timed out. Killing it
[1458863481] wproc: NOTIFY job 22 from worker Core Worker 1205 timed out after 30.01s
[1458863481] wproc: host=Windows 8.1 Pro; service=(none); contact=nagiosadmin
[1458863481] wproc: early_timeout=1; exited_ok=0; wait_status=0; error_code=62;
[1458863481] Warning: Notifying contact 'nagiosadmin' of host 'Windows S1' by command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: CUSTOM\nHost: Windows S1\nState: UP\nAddress: 10.221.55.15\nInfo: PING OK - Packet loss = 0%, RTA = 0.61 ms\n\nDate/Time: Thu Mar 24 16:50:51 PDT 2016\n" | /usr/sbin/sendmail -s 10.221.176.3:2525 -t [email protected] -f [email protected] -l /var/log/sendemail -u "** CUSTOM Host Alert: Windows S1 is UP **" -m "***** Nagios *****\n\nNotification Type: CUSTOM\nHost: Windows S1\nState: UP\nAddress: 10.221.55.15\nInfo: PING OK - Packet loss = 0%, RTA = 0.61 ms\n\nDate/Time: Thu Mar 24 16:50:51 PDT 2016\n"' timed out after 0.00 seconds
[1458863481] wproc: Core Worker 1205: job 22 (pid=5746): Dormant child reaped
[1458863482] SERVICE NOTIFICATION: nagiosadmin;Windows 8.1 Pro;Printer1;UNKNOWN;notify-service-by-email;Unknown command(s): check_pqueue
[1458863492] HOST ALERT: NWPrinter;DOWN;SOFT;8;PING CRITICAL - Packet loss = 100%
[1458863494] SERVICE NOTIFICATION: nagiosadmin;Windows 8.1 Pro;testps1;WARNING;notify-service-by-email;Test
[1458863500] wproc: Core Worker 1204: job 23 (pid=5811) timed out. Killing it
[1458863500] wproc: NOTIFY job 23 from worker Core Worker 1204 timed out after 30.01s
[1458863500] wproc: host=Windows 8.1 Pro; service=C:\ Drive Space; contact=nagiosadmin
[1458863500] wproc: early_timeout=1; exited_ok=0; wait_status=0; error_code=62;
[1458863500] Warning: Notifying contact 'nagiosadmin' of service 'C:\ Drive Space' on host 'Windows S1' by command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: C:\ Drive Space\nHost: windows S1\nAddress: 10.221.55.15\nState: CRITICAL\n\nDate/Time: Thu Mar 24 16:51:10 PDT 2016\n\nAdditional Info:\n\nc:\ - total: 63.66 Gb - used: 61.75 Gb (97%) - free 1.90 Gb (3%)" | /usr/sbin/sendmail -s 10.221.176.3:2525 -t [email protected] -f [email protected] -l /var/log/sendemail -u "** PROBLEM Service Alert: windows S1/C:\ Drive Space is CRITICAL **" -m "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: C:\ Drive Space\nHost: windows S1\nAddress: 10.211.55.15\nState: CRITICAL\n\nDate/Time: Thu Mar 24 16:51:10 PDT 2016\n\nAdditional Info:\n\nc:\ - total: 63.66 Gb - used: 61.75 Gb (97%) - free 1.90 Gb (3%)"' timed out after 0.00 seconds
[1458863500] wproc: Core Worker 1204: job 23 (pid=5811): Dormant child reaped
Mail.log -
Mar 24 16:43:41 ubuntu sm-mta[3467]: starting daemon (8.14.4): SMTP+queueing@00:10:00
Mar 24 16:43:43 ubuntu sm-msp-queue[2530]: unable to qualify my own domain name (ubuntu) -- using short name
Mar 24 16:43:43 ubuntu sm-msp-queue[2530]: dangerous permissions=42775 on queue directory /var/spool/mqueue-client/
Mar 24 16:44:09 ubuntu sendmail[4226]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:44:27 ubuntu sendmail[4335]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:45:21 ubuntu sendmail[4526]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:45:27 ubuntu sendmail[4559]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:46:02 ubuntu sendmail[4753]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:47:14 ubuntu sendmail[5003]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:47:25 ubuntu sendmail[5044]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:50:11 ubuntu sendmail[5612]: My unqualified host name (ubuntu) unknow$
Mar 24 16:50:51 ubuntu sendmail[5748]: My unqualified host name (ubuntu) unknow$
Could you please help and let me know solution of it.
Regards,
Arvind
Nagios.log -
[1458863451] HOST NOTIFICATION: nagiosadmin;Windows S1;CUSTOM (UP);notify-host-by-email;PING OK - Packet loss = 0%, RTA = 0.61 ms;Nagios Admin;Sample Custom
[1458863470] SERVICE NOTIFICATION: nagiosadmin;Windows S1;C:\ Drive Space;CRITICAL;notify-service-by-email;c:\ - total: 63.66 Gb - used: 61.75 Gb (97%) - free 1.90 Gb (3%)
[1458863478] HOST ALERT: NWPrinter1;DOWN;SOFT;7;PING CRITICAL - Packet loss = 100%
[1458863481] wproc: Core Worker 1205: job 22 (pid=5746) timed out. Killing it
[1458863481] wproc: NOTIFY job 22 from worker Core Worker 1205 timed out after 30.01s
[1458863481] wproc: host=Windows 8.1 Pro; service=(none); contact=nagiosadmin
[1458863481] wproc: early_timeout=1; exited_ok=0; wait_status=0; error_code=62;
[1458863481] Warning: Notifying contact 'nagiosadmin' of host 'Windows S1' by command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: CUSTOM\nHost: Windows S1\nState: UP\nAddress: 10.221.55.15\nInfo: PING OK - Packet loss = 0%, RTA = 0.61 ms\n\nDate/Time: Thu Mar 24 16:50:51 PDT 2016\n" | /usr/sbin/sendmail -s 10.221.176.3:2525 -t [email protected] -f [email protected] -l /var/log/sendemail -u "** CUSTOM Host Alert: Windows S1 is UP **" -m "***** Nagios *****\n\nNotification Type: CUSTOM\nHost: Windows S1\nState: UP\nAddress: 10.221.55.15\nInfo: PING OK - Packet loss = 0%, RTA = 0.61 ms\n\nDate/Time: Thu Mar 24 16:50:51 PDT 2016\n"' timed out after 0.00 seconds
[1458863481] wproc: Core Worker 1205: job 22 (pid=5746): Dormant child reaped
[1458863482] SERVICE NOTIFICATION: nagiosadmin;Windows 8.1 Pro;Printer1;UNKNOWN;notify-service-by-email;Unknown command(s): check_pqueue
[1458863492] HOST ALERT: NWPrinter;DOWN;SOFT;8;PING CRITICAL - Packet loss = 100%
[1458863494] SERVICE NOTIFICATION: nagiosadmin;Windows 8.1 Pro;testps1;WARNING;notify-service-by-email;Test
[1458863500] wproc: Core Worker 1204: job 23 (pid=5811) timed out. Killing it
[1458863500] wproc: NOTIFY job 23 from worker Core Worker 1204 timed out after 30.01s
[1458863500] wproc: host=Windows 8.1 Pro; service=C:\ Drive Space; contact=nagiosadmin
[1458863500] wproc: early_timeout=1; exited_ok=0; wait_status=0; error_code=62;
[1458863500] Warning: Notifying contact 'nagiosadmin' of service 'C:\ Drive Space' on host 'Windows S1' by command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: C:\ Drive Space\nHost: windows S1\nAddress: 10.221.55.15\nState: CRITICAL\n\nDate/Time: Thu Mar 24 16:51:10 PDT 2016\n\nAdditional Info:\n\nc:\ - total: 63.66 Gb - used: 61.75 Gb (97%) - free 1.90 Gb (3%)" | /usr/sbin/sendmail -s 10.221.176.3:2525 -t [email protected] -f [email protected] -l /var/log/sendemail -u "** PROBLEM Service Alert: windows S1/C:\ Drive Space is CRITICAL **" -m "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: C:\ Drive Space\nHost: windows S1\nAddress: 10.211.55.15\nState: CRITICAL\n\nDate/Time: Thu Mar 24 16:51:10 PDT 2016\n\nAdditional Info:\n\nc:\ - total: 63.66 Gb - used: 61.75 Gb (97%) - free 1.90 Gb (3%)"' timed out after 0.00 seconds
[1458863500] wproc: Core Worker 1204: job 23 (pid=5811): Dormant child reaped
Mail.log -
Mar 24 16:43:41 ubuntu sm-mta[3467]: starting daemon (8.14.4): SMTP+queueing@00:10:00
Mar 24 16:43:43 ubuntu sm-msp-queue[2530]: unable to qualify my own domain name (ubuntu) -- using short name
Mar 24 16:43:43 ubuntu sm-msp-queue[2530]: dangerous permissions=42775 on queue directory /var/spool/mqueue-client/
Mar 24 16:44:09 ubuntu sendmail[4226]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:44:27 ubuntu sendmail[4335]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:45:21 ubuntu sendmail[4526]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:45:27 ubuntu sendmail[4559]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:46:02 ubuntu sendmail[4753]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:47:14 ubuntu sendmail[5003]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:47:25 ubuntu sendmail[5044]: My unqualified host name (ubuntu) unknown; sleeping for retry
Mar 24 16:50:11 ubuntu sendmail[5612]: My unqualified host name (ubuntu) unknow$
Mar 24 16:50:51 ubuntu sendmail[5748]: My unqualified host name (ubuntu) unknow$
Could you please help and let me know solution of it.
Regards,
Arvind