更新时间:2022-09-23 23:09:11
Nagios is not sending notifications via email.
In the logs:
cat /var/log/messages |grep notification
nagios nagios: Warning: Contact ‘nagiosadmin’ service notification command ‘/usr/bin/printf “%b” “***** Nagios *****/n/nNotification Type: PROBLEM/n/nService: Total Processes/nHost: thehost/nAddress: ipaddress/nState: WARNING/n/nDate/Time: Tue Sept 29 16:06:54 PDT 2009/n/nAdditional Info:/n/nPROCS WARNING: 397 processes with STATE = RSZDT” | /bin/mail -s “** PROBLEM Service Alert: hostname/Total Processes is WARNING **” support@acme.com’ timed out after 30 seconds
Solution / Answer:
The default time-out setting of 30 seconds is too short, for MTA to process request. Change the default time to 120 seconds or more.
Change the setting “notification_timeout” in nagios.cfg
# vi /usr/local/nagios/etc/nagios.cfg
Change the value of “notification_timeout=30″ to “notification_timeout=120″
notification_timeout=120