i have installed nagios4 from ubuntu repository packages in a kvm guest running ubuntu server 20.04. i am able to invoke sendmail manually and can send emails. However nagios isn't sending any emails. /var/log/mail.log
only contains entries for my manual invocations. /var/log/nagios4/nagios.log
contains numerous entries suggesting nagios is trying to send email:
[1627148632] SERVICE NOTIFICATION: me;localhost;/dev/shm;UNKNOWN;notify-service-by-email;DISK UNKNOWN - free space:
[1627148662] wproc: Core Worker 28377: job 11764 (pid=211002) timed out. Killing it
[1627148663] wproc: NOTIFY job 11764 from worker Core Worker 28377 timed out after 31.05s
[1627148663] wproc: host=localhost; service=/dev/shm; contact=me
[1627148663] wproc: early_timeout=1; exited_ok=0; wait_status=0; error_code=62;
[1627148663] Warning: Notifying contact 'me' of service '/dev/shm' on host 'localhost' by command '/usr/bin/printf "%b" "***** Nagios *****\n\nNotification Type: PROBLEM\n\nService: /dev/shm\nHost: localhost\nAddress: 127.0.0* .1\nState: UNKNOWN\n\nDate/Time: Sat Jul 24 12:43:52 CDT 2021\n\nAdditional Info:\n\nDISK UNKNOWN - free space:\n"|/usr/bin/mail -s"** localhost /dev/shm UNKNOWN **" [email protected]' timed out after 0.00 seconds
When i issue the command shown in the last line above the email gets sent. But what's up with nagios4? Why isn't it sending any emails?
Additional info: sendmail is apparently taking or waiting 60 seconds to send each email. And apparently nagios is timing out after 30 seconds. What's needed to fix either of these?