Cannot read status info Not the easy answers

Casey Russell caseyr at caseyrussell.com
Fri Aug 1 05:46:39 CEST 2003


Good evening all,

I've got (what I think is) an interesting problem and frustrating as well.

I've compiled Nagios 1.1 on a Redhat 9 system  Configs and Makes all went
fine and after adjusting configs I get a really annoying problem.

I've got authentication working fine... I got no problems when I start it
with the -v option and the Daemon runs fine.  I get notifications and cat
/usr/local/nagios/var/status.log shows a bunch of obviously correct status
info.  However when I go to the web interface, I get "Whoops!  Error: Could
not read host and service status information!"  blah blah blah.  So I
checked the obvious.

Nagios.log shows no problems starting the daemon and no error messages
relating to reading or writing the status info.  Thinking maybe the cgi's
were configured to look to a database, I logged into the server and became
'apache', the webserver's user. changed to the .cgi directory.

I then did 'REQUEST_METHOD=GET REMOTE_USER=caseyr ./status.cgi >>
/var/www/html/caseypage.htm'

BTW, that is the same user I'm authenticating as to the web server.

when I look at the resultant web page, I see a very normal looking nagios
status page showing very correct looking status information for all of my
devices.  Any Idea why I can run the cgi from the command line as the
webserver's user, but not from the web interface??

for information:
[root at pup nagios]# ls -la /usr/local/nagios/var
total 156
drwxrw----    4 nagios   nagios       4096 Jul 31 22:42 .
drwxr-xr-x    8 root     root         4096 Jul 29 15:23 ..
drwxrwxr-x    2 nagios   nagios       4096 Jul 31 00:00 archives
-rw-rw-r--    1 nagios   nagios          0 Jul 31 20:28 comment.log
-rw-rw-r--    1 nagios   nagios          0 Jul 31 20:28 downtime.log
-rw-r--r--    1 root     root            6 Jul 31 20:28 nagios.lock
-rw-rw-r--    1 nagios   nagios     112569 Jul 31 22:41 nagios.log
drwxrwsr-x    2 nagios   nagios       4096 Jul 31 20:28 rw
-rw-rw-r--    1 nagios   nagios      10892 Jul 31 22:42 status.log
-rw-r--r--    1 nagios   nagios       6693 Jul 31 22:28 status.sav

you can see, status.log is readable by all users.

[root at pup nagios]# ls -la /var/www/cgi-bin/nagios/
total 2028
drwxr-xr-x    2 root     root         4096 Jul 30 11:24 .
drwxr-xr-x    5 root     root         4096 Jul 31 22:02 ..
-rwxrwxr-x    1 nagios   nagios     143792 Jul 29 14:29 avail.cgi
-rwxrwxr-x    1 nagios   nagios     144924 Jul 29 14:29 cmd.cgi
-rwxrwxr-x    1 nagios   nagios     113840 Jul 29 14:29 config.cgi
-rwxrwxr-x    1 nagios   nagios     160292 Jul 29 14:29 extinfo.cgi
-rwxrwxr-x    1 nagios   nagios     124208 Jul 29 14:29 histogram.cgi
-rwxrwxr-x    1 nagios   nagios     105764 Jul 29 14:29 history.cgi
-rw-r--r--    1 root     root          109 Jul 30 11:24 .htaccess
-rwxrwxr-x    1 nagios   nagios     101604 Jul 29 14:29 notifications.cgi
-rwxrwxr-x    1 nagios   nagios      98392 Jul 29 14:29 outages.cgi
-rwxrwxr-x    1 nagios   nagios     100260 Jul 29 14:29 showlog.cgi
-rwxrwxr-x    1 nagios   nagios     145180 Jul 29 14:29 status.cgi
-rwxrwxr-x    1 nagios   nagios     127320 Jul 29 14:29 statusmap.cgi
-rwxrwxr-x    1 nagios   nagios     114864 Jul 29 14:29 statuswml.cgi
-rwxrwxr-x    1 nagios   nagios     108760 Jul 29 14:29 statuswrl.cgi
-rwxrwxr-x    1 nagios   nagios     119152 Jul 29 14:29 summary.cgi
-rwxrwxr-x    1 nagios   nagios     123100 Jul 29 14:29 tac.cgi
-rwxrwxr-x    1 nagios   nagios     126448 Jul 29 14:29 trends.cgi

and the .cgi's are executable by all users..

I'm all out of ideas, any help is appreciated.

Casey Russell
kingofthehill(at)caseyrussell.com



-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list