<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>

<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
We have hit a weird situation with Nagios and I hope someone in the
community can assist or provide some details of additional
troubleshooting steps we can/should take.<br>
<br>
The situation is Nagios doesn't seem to be sending out host or service
notifications.  I have done the following debugging:<br>
<ol>
  <li>Ensure there is no Nagios configuration errors with nagios -v
nagios.cfg (no configuration errors)</li>
  <li>Stopped and started Nagios to ensure there are no configuration
errors that -v isn't aware of (and no errors and Nagios restarts
correctly)</li>
  <li>Stopped Nagios and deleted both objects.cache retention.dat and
restarted to ensure there was nothing legacy in the configuration</li>
  <li>Ensure that both on a service, host and global basis that
notifications are enabled (and they are)</li>
  <li>Reviewing the nagios configuration (both in the files and via
"view config" from the Nagios UI)<br>
  </li>
</ol>
<br>
When a host (or service) experiences a problem the normal process seems
to be happening (from what I see in the UI and the logs):<br>
<br>
[1244096420] SERVICE ALERT: localhost;root
/dev/mapper/VolGroup00-LogVol00;CRITICAL;SOFT;1;DISK CRITICAL - free
space: / 17736 MB (4% inode=99%):<br>
[1244096480] SERVICE ALERT: localhost;root
/dev/mapper/VolGroup00-LogVol00;CRITICAL;SOFT;2;DISK CRITICAL - free
space: / 17739 MB (4% inode=99%):<br>
[1244096540] SERVICE ALERT: localhost;root
/dev/mapper/VolGroup00-LogVol00;CRITICAL;SOFT;3;DISK CRITICAL - free
space: / 17739 MB (4% inode=99%):<br>
[1244096600] SERVICE ALERT: localhost;root
/dev/mapper/VolGroup00-LogVol00;CRITICAL;HARD;4;DISK CRITICAL - free
space: / 17739 MB (4% inode=99%):<br>
[1244096600] SERVICE NOTIFICATION: nagiosadmin;localhost;root
/dev/mapper/VolGroup00-LogVol00;CRITICAL;notify-service-by-email;DISK
CRITICAL - free space: / 17739 MB (4% inode=99%):<br>
<br>
After enabling debugging (debug_level=32) I see the following in the
debug log:<br>
<br>
[1244096600.182820] [032.0] [pid=7951] ** Service Notification Attempt
** Host: 'localhost', Service: 'root /dev/mapper/VolGroup00-LogVol00',
Type: 0, Options: 0, Current State: 2, Last Notification: Thu Jan  1
12:00:00 1970<br>
[1244096600.182945] [032.0] [pid=7951] Notification viability test
passed.<br>
[1244096600.182986] [032.1] [pid=7951] Current notification number: 1
(incremented)<br>
[1244096600.183016] [032.1] [pid=7951] Service notification will NOT be
escalated.<br>
[1244096600.183042] [032.1] [pid=7951] Adding normal contacts for
service to notification list.<br>
[1244096600.198454] [032.0] [pid=7951] 1 contacts were notified.  Next
possible notification time: Thu Jun  4 19:23:20 2009<br>
[1244096600.198514] [032.0] [pid=7951] 1 contacts were notified.<br>
<br>
I'm able to manually use the mail command to send external e-mail (have
attempted this several times) and can confirm that I can manually
execute the command_line for the notification option:<br>
<br>
# 'notify-service-by-email' command definition<br>
define command{<br>
        command_name    notify-service-by-email<br>
        command_line    /usr/bin/printf "%b" "***** Nagios
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService:
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState:
$SERVICESTATE$\n\nDate/Time: $LONGDATETIME$\n\nAdditional
Info:\n\n$SERVICEOUTPUT$" | /usr/bin/mailx -s "** $NOTIFICATIONTYPE$
Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **"
$CONTACTEMAIL$<br>
        }<br>
<br>
I have addjusted the command_line and changed it to something like (for
example):<br>
<br>
    command_line    echo "testing" | /usr/bin/mail -s "** TEST SUBJECT
**" <a class="moz-txt-link-abbreviated" href="mailto:my@email.address">my@email.address</a><br>
<br>
Nagios doesn't have any configuration errors, starts up but still
doesn't seem to fire the command!!<br>
<br>
<br>
All this said I'm not seeing anything in the mail server logs
indicating that Nagios is even attempting to use
notify-service-by-email and send e-mail.<br>
<br>
Would really appreciate any suggestion anyone can assist with.<br>
<br>
<br>
Cheers<br>
<br>
<pre class="moz-signature" cols="72">-- 

Tim Philips

</pre>
</body>
</html>