<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I have been operating Nagios and most of it's features to monitor 70
services for quite some time successfully but something that I want to
fix now is a tiny thing in the top of the screen which says:<br>
<br>
<div class="infoBoxTitle">Current Network Status</div>
Last Updated: Fri Aug 11 18:42:22 BST 2006<br>
Updated every 90 seconds<br>
Nagios® - <a href="http://www.nagios.org" target="_new"
class="homepageURL">www.nagios.org</a><br>
Logged in as <i>nagiosadmin</i><br>
<div class="infoBoxBadProcStatus">Warning: Monitoring process may not
be running!<br>
Click <a href="http://nagios/nagios/cgi-bin/extinfo.cgi?type=0">here</a>
for more info.<br>
<br>
The Nagios process is running and it's showing the following details
when clicking the link "here"<br>
<br>
<table border="0" cellpadding="20">
<tbody>
<tr>
<td valign="top">
<div class="dataTitle">Process Information</div>
<table class="data" border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="stateInfoTable1">
<table border="0">
<tbody>
<tr>
<td class="dataVar">Program Start Time:</td>
<td class="dataVal">11-08-2006 18:40:29</td>
</tr>
<tr>
<td class="dataVar">Total Running Time:</td>
<td class="dataVal">0d 0h 3m 11s</td>
</tr>
<tr>
<td class="dataVar">Last External Command Check:</td>
<td class="dataVal">11-08-2006 18:43:30</td>
</tr>
<tr>
<td class="dataVar">Last Log File Rotation:</td>
<td class="dataVal">N/A</td>
</tr>
<tr>
<td class="dataVar">Nagios PID</td>
<td class="dataval">5396</td>
</tr>
<tr>
<td class="dataVar">Notifications Enabled?</td>
<td class="dataVal">
<div class="notificationsENABLED"> YES </div>
</td>
</tr>
<tr>
<td class="dataVar">Service Checks Being Executed?</td>
<td class="dataVal">
<div class="checksENABLED"> YES </div>
</td>
</tr>
<tr>
<td class="dataVar">Passive Service Checks Being
Accepted?</td>
<td class="dataVal">
<div class="checksENABLED"> YES </div>
</td>
</tr>
<tr>
<td class="dataVar">Event Handlers Enabled?</td>
<td class="dataVal">Yes</td>
</tr>
<tr>
<td class="dataVar">Obsessing Over Services?</td>
<td class="dataVal">No</td>
</tr>
<tr>
<td class="dataVar">Flap Detection Enabled?</td>
<td class="dataVal">No</td>
</tr>
<tr>
<td class="dataVar">Performance Data Being Processed?</td>
<td class="dataVal">No</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
<td valign="top">
<div class="commandTitle">Process Commands</div>
<table class="command" border="1" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td>
<div class="infoMessage" align="center">It appears as
though Nagios is not running, so commands are temporarily
unavailable...
</div>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<div class="dataTitle">Process Status Information</div>
<table border="0">
<tbody>
<tr>
<td class="dataVar">Process Status:</td>
<td class="dataVal">
<div class="processUNKNOWN"> UNKNOWN </div>
</td>
</tr>
<tr>
<td class="dataVar">Check Command Output: </td>
<td class="dataVal">Nagios check command did not return any
output </td>
</tr>
</tbody>
</table>
<br>
<br>
</div>
The nagios check command is definitely running and the check_command is
defined as follows in the cgi.cfg:<br>
<br>
nagios_check_command=/usr/nagios/libexec/check_nagios
/var/nagios/status.log 5 /usr/nagios/bin/nagios<br>
<br>
<br>
I've run this from the command line as both root and the nagios user
which the process runs under. The result is positive as follows:<br>
<br>
Nagios ok: located 1 process, status log updated 11 seconds ago<br>
<br>
<br>
So why doesn't Nagios think it works? Using I/O redirection I've
isolated that it is indeed printed to stdout so this should just work.
It shouldn't be complaining about "Nagios check command did not return
any output".<br>
<br>
ll /var/nagios/<br>
total 72<br>
drwxrwxr-x 2 nagios apache 4096 Aug 11 00:00 archives/<br>
-rw-rw-r-- 1 nagios nagios 0 Aug 11 18:40 comment.log<br>
-rw-rw-r-- 1 nagios nagios 0 Aug 11 18:40 downtime.log<br>
-rw-r--r-- 1 root root 5 Aug 11 18:40 nagios.lock<br>
-rw-rw-r-- 1 nagios nagios 24430 Aug 11 18:53 nagios.log<br>
drwxrws--- 2 nagios apache 4096 Aug 11 18:40 rw/<br>
-rw-rw-r-- 1 nagios nagios 18044 Aug 11 18:54 status.log<br>
-rw-r--r-- 1 nagios nagios 13602 Aug 11 18:40 status.sav<br>
<br>
<br>
<br>
Although this is in the FAQ, it simply says make sure the check_command
is done is cgi.cfg which isn't helpful to me in this situation since I
know the command is in there and it's paths are correct.<br>
<br>
<br>
Anybody got any ideas on this?<br>
<br>
<br>
<br>
</body>
</html>