
Error: Could not read host and service status information!
Solution:
First of all, make sure that the nagios service is running. You can check this by running the following command:
service nagios status
OR
/etc/init.d/nagios status
The output should resemble:nagios start/running, process 1234
If the service is not running, you will see an output as follows:nagios stop/waiting
To start the nagios service, run the following command:service nagios start
Now, start the nagios daemon using the command:/usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Now, try clicking on "Hosts" or "Services" link. Error should have been eliminated, at least until the next reboot.
thanks.. it worked
ReplyDeleteThanks. it's fixed error.
ReplyDeleteThis comment has been removed by a blog administrator.
ReplyDeleteerror which i got is like : No lock file found in /usr/local/nagios/var/nagios.lock
ReplyDeleteIts because 'nagios' service is not running. You can start it with 'service nagios start'
DeleteHi I followed the steps above and it still didnt work for me. Any idea why this could be happening?
ReplyDeletewhile running the command service nagios status
ReplyDeleteLoaded: loaded (/usr/lib/systemd/system/nagios.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Mon 2016-05-30 16:12:30 NPT; 15min ago
Docs: https://www.nagios.org/documentation/
Process: 17833 ExecStartPre=/usr/sbin/nagios -v /etc/nagios/nagios.cfg (code=exited, status=1/FAILURE)
May 30 16:12:30 centos7 nagios[17833]: Check your configuration file(s...d
May 30 16:12:30 centos7 nagios[17833]: directives and data defintions....s
May 30 16:12:30 centos7 nagios[17833]: version of Nagios, you should b...s
May 30 16:12:30 centos7 nagios[17833]: may have been removed or modifi...d
May 30 16:12:30 centos7 nagios[17833]: the HTML documentation regardin...e
May 30 16:12:30 centos7 nagios[17833]: 'Whats New' section to find out....
May 30 16:12:30 centos7 systemd[1]: nagios.service: control process ex...1
May 30 16:12:30 centos7 systemd[1]: Failed to start Nagios Network Mon....
May 30 16:12:30 centos7 systemd[1]: Unit nagios.service entered failed....
May 30 16:12:30 centos7 systemd[1]: nagios.service failed.
Hint: Some lines were ellipsized, use -l to show in full.
show error can't start nagios.
for me chmod 777 -R /usr/local/nagios/var/spool/checkresults/
ReplyDeleteHope this helps
Regards,
Premkumar Waghmare
#in nagios.cfg file
ReplyDeletepls write the following line if your dev new plugin like
cfg_dir=/usr/local/nagios/xx/xx
ex:cfg_file=/usr/local/nagios/etc/objects/newhost.cfg
Thanks!
ReplyDelete