…inheriting another nagios configuration, I am getting the following error in the UI when choosing Process Info:
Process Status:
UNKNOWN
Check Command Output: Could not open pipe for process check command
the relevant entry in cgi.cfg is:
nagios_check_command=/usr/local/nagios/plugins/libexec/check_nagios -F /usr/local/nagios/var/status.log -e 5 -C “./bin/nagios”
executing this manually works fine as nagios user:
Nagios ok: located 1 process, status log updated 4 seconds ago
echo $?
0
nagios is running as:
nagios 23321 1 0 13:46:46 ? 0:00 ./bin/nagios ./etc/nagios.cfg
apache is running as:
root 22642 1 0 13:16:36 ? 0:00 /usr/local/nagios/apache/bin/httpd -k start
nobody 22650 22642 0 13:16:52 ? 0:00 /usr/local/nagios/apache/bin/httpd -k start
nobody 22646 22642 0 13:16:36 ? 0:00 /usr/local/nagios/apache/bin/httpd -k start
nobody 22645 22642 0 13:16:36 ? 0:00 /usr/local/nagios/apache/bin/httpd -k start
nobody 22647 22642 0 13:16:36 ? 0:00 /usr/local/nagios/apache/bin/httpd -k start
nobody 22643 22642 0 13:16:36 ? 0:00 /usr/local/nagios/apache/bin/httpd -k start
nobody 22644 22642 0 13:16:36 ? 0:00 /usr/local/nagios/apache/bin/httpd -k start
/etc/group entry:
nagiocmd::4001:nagios,nobody,root
directory/file permissions:
drwxrwxr-x 20 nagios nagios 1536 Apr 17 13:57 nagios
drwxr-xr-x 15 nagios nagios 512 Mar 8 14:55 apache
drwxr-xr-x 5 nagios nagios 512 Apr 12 17:09 plugins
drwxr-xr-x 2 nagios nagios 1536 Apr 17 13:55 libexec
-rwxr-xr-x 1 nagios nagios 483416 Apr 12 17:09 check_nagios
drwxrwxr-x 4 nagios nagiocmd 512 Apr 17 14:20 var
drwxrwsr-x 2 nagios nagiocmd 512 Apr 17 13:46 rw
prw-rw---- 1 nagios nagiocmd 0 Apr 17 13:46 nagios.cmd
…anything else I can check?
It looks like for some reason spopen in cgiutils.c is not working right as it must be returning a NULL for STATE_UNKNOWN to be set (see line 1243 in ./nagios-1.2/cgi/cgiutils.c)
This is on Solaris 9. Might this be a bug/incompatibility with nagios 1.2 and Solaris 9? Would upgrading to Nagios 2.2 solve this? Thanks for any suggestions.