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

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
gavinh
Posts: 42
Joined: Wed Apr 08, 2015 4:44 pm

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

Post 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?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post 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?
Former Nagios Employee.
me.
gavinh
Posts: 42
Joined: Wed Apr 08, 2015 4:44 pm

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

Post 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
gavinh
Posts: 42
Joined: Wed Apr 08, 2015 4:44 pm

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

Post 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?
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

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

Post 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."
Former Nagios Employee.
me.
Locked