Page 1 of 1

hosts and service status => Error: Could not read hos

Posted: Mon Oct 19, 2015 10:59 am
by gavinh
This morning I noticed that I am randomly getting an error 'Error: Could not read host and service status information!' when viewing host or service problems. A couple page refreshes and it goes away, any ideas?

Re: hosts and service status => Error: Could not read hos

Posted: Mon Oct 19, 2015 11:08 am
by hsmith
Can we get some more information?
  • What version of Core are you running?
  • What OS is it running on?
  • How did you install Core?
  • How long has this been happening?
  • Is there anything in /var/log/httpd/access_log or /var/log/httpd/error_log that may give us some clues?

Re: hosts and service status => Error: Could not read hos

Posted: Mon Oct 19, 2015 11:19 am
by gavinh
Here you go;

NagiosĀ® Coreā„¢ 3.5.1
Ubuntu 14.04.3 LTS
Apt repo
In the last 3 days, noticed it today.
access_log looks fine at a glance
error_log has a clue;

Mon Oct 19 08:48:02.605278 2015] [cgi:warn] [pid 52159] [client 10.2.166.227:58106] AH01220: Timeout waiting for output from CGI script /usr/lib/cgi-bin/nagios3/cmd.cgi, referer: http://mobile-mon-02/cgi-bin/nagios3/cm ... orce_check
[Mon Oct 19 08:48:02.605365 2015] [cgi:error] [pid 52159] [client 10.2.166.227:58106] Script timed out before returning headers: cmd.cgi, referer: http://mobile-mon-02/cgi-bin/nagios3/cm ... orce_check
[Mon Oct 19 08:53:02.705436 2015] [cgi:warn] [pid 52159] [client 10.2.166.227:58106] AH01220: Timeout waiting for output from CGI script /usr/lib/cgi-bin/nagios3/cmd.cgi, referer: http://mobile-mon-02/cgi-bin/nagios3/cm ... orce_check

Re: hosts and service status => Error: Could not read hos

Posted: Mon Oct 19, 2015 11:31 am
by gavinh
I had a number of tests that returned a NULL value, the script just checks the last modified via stat and outputs the difference in hours. This test should never return a NULL, so I forced a check to get a god result. In doing so, that caused cmd.cgi to time out?

Re: hosts and service status => Error: Could not read hos

Posted: Mon Oct 19, 2015 4:43 pm
by hsmith
  • What are the specs like on the system?
  • How many hosts/services do you have?
  • How much memory?
  • What does the output of of a top | head -n5 command look like?
The repo is pretty outdated and could use some love, if it is possible I would really recommend an install from source on CentOS. But I completely understand "if it ain't broke, don't fix it."