Web status won't change even when nagios is not running


#1

Hi List, I tried to ask this in the nagios user 's mail list but got no clue up till now, please see if you can provide any help and info here. Thanks.

situation is

  1. after the configuration, I can monitor the services on the local host and local network hosts
  2. when I made the changes on the configuration, I need to restart the nagios process
  3. for the first couple of times when I restarted the nagios process, the service that being monitored, their status on the web would show Pending first and then turned to green one by one … which is OK
  4. I left it there for a night, the other morning, when I killed the nagios’s process (only nagios process), found the the content on the web is still the same, which all services are still OK/green even without nagios running.
  5. I tried to killed some of the services as well, but the content still would not be changed.
  6. then I started the nagios again, this time it would refresh the status and tells the services that I shutdown are CRITICAL/Red.
  7. I killed the nagios process again, everything stays the same.

is this configuration on the nagios or on the apache? some place cache it?

I m afraid of my broswer’s caching so I tried to visit the web page from another computer which never visit the page before, know what, It shows the same normal page when WITHOUT nagios running.

I did another test,

  1. kill the nagios process
  2. visit my_ip/nagios -> normal
  3. click Monitoring -> Service Detail -> normal , same page is showed before the process was killed
  4. mv …/nagios/var/status.dat …/nagios/var/status.dat.old
  5. visit my_ip/nagios -> normal
  6. click Monitoring -> Service Detail -> this time I got

Whoops!
Error: Could not read host and service status information!

The most common cause of this error message (especially for new users), is the fact that Nagios is not actually running. If Nagios is indeed not running, this is a normal error message. It simply indicates that the CGIs could not obtain the current status of hosts and services that are being monitored. If you’ve just installed things, make sure you read the documentation on starting Nagios.

Some other things …

  1. start the nagios process, everything went back to normal

is this status.dat suppose to be deleted after the nagios is off?

please comment, thanks.

Regards,

-tea


#2

stop the nagios process.
kill ALL remaining nagios processes(use “ps -ef | grep nagios” to find them)
start nagios again.

Luca


#3

thanks for the reply, yes, I did all that you mentioned, somehow, web page still shows the same.

Any other possibilities?


#4

you should get the “WHOOPS” error if nagios is not running. if you still see the services status nagios is still running somehow…

the status.dat file should remain there. if you kill nagios and restart it will reread it’s status and start from there… it will then update as the checks are being performed…
I have th eimpression i didn’t catch your question… :smiley:

Luca


#5

sorry, in short my question is … even without any nagios process running, I cannot get the WHOOPS page. the web page will remain the same as if the nagios is still running however will not update anymore. Thanks.


#6

when you stop nagios is the nagios.lock file still there? it shouldn’t… are you sure there’s no nagios process alive after shutting down nagios?

Luca


#7

Hi, there is no nagios.lock file after I killed the nagios process, and to be 100% sure, there is no nagios process running.

for 4 days there is no nagios running and I still can get the web page with previous status(before I killed nagios), even from another pc 's browser that never access this page before. Weird!


#8

You know, it would seem that since it’s been stated that “there is another nagios process running” that you would have pasted an output of…
ps -ef|grep nagios

So, let’s see, you are not getting woops page and yet nagios is not running. Only answer is Nagios is running, and you just don’t realize it.

Make sure nagios is not set to start up autmatically upon a system boot, and reboot your computer. Turn off httpd also and check the website. Now start the website and check the nagios site. You will HAVE to get the woops page. Show us how you made sure nagios would not start upon boot and paste the commands used to do this.


#9

ps -ef | grep -v grep | grep nagios

nagios 27212 27160 0 11:47 ? 00:00:02 ./nagios …/etc/nagios.cfg

kill -9 27212

ps -ef | grep -v grep | grep nagios

no init script cause i did not run make install-init
#find / -name nagios* -print
/var/spool/mail/nagios
/opt/nagios
/opt/nagios/bin/nagios

I don’t think this issue is very simple, I also killed all the httpd too, when i restarted httpd the page comes the same with the previous status even WITHOUT nagios running, no Woops page …