# cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core) Minimal Fresh install
# sestatus
SELinux status: disabled
Following your instructions here : https://support.nagios.com/kb/article.p ... ategory=58
and
here: https://support.nagios.com/kb/article.php?id=515
Distributions:
Nagios: https://github.com/NagiosEnterprises/na ... 2.2.tar.gz
Nagios Plugins: https://github.com/nagios-plugins/nagio ... 1.3.tar.gz
NRPE https://github.com/NagiosEnterprises/nr ... 3.0.tar.gz
After installations is completed I'm testing with :
netstat -at | grep nrpe
/usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Everything is working OK, no errors detected, Tests are OK, Web interface works fine, monitors OK.
BUT after hard reboot of the server I'm getting the following :
WEB Interface: Error: Could not read object configuration data!
#systemctl restart nagios.service
Code: Select all
Job for nagios.service failed because the control process exited with error code. See "systemctl status nagios.service" and "journalctl -xe" for details.Code: Select all
Nagios Core 4.2.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-24-2016
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Error in configuration file '/usr/local/nagios/etc/nagios.cfg' - Line 452 (Check result path '/usr/local/nagios/var/spool/checkresults' is not a valid directory)
Error processing main config file!I decided to create directory /usr/local/nagios/var/spool/checkresults sins does not exist
# install -d -m 744 -o nagios -g nagios /usr/local/nagios/var/spool/checkresults
# ls -ld /usr/local/nagios/var/spool/checkresults
Code: Select all
drwxr--r-- 2 nagios nagios 6 Nov 14 14:52 /usr/local/nagios/var/spool/checkresults# systemctl restart nagios.service
# systemctl restart httpd
Now strange thing is happening, Nagios kind of starting ... or at list do not shows any issues when restarting:
# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Code: Select all
Nagios Core 4.2.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-24-2016
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Checked 8 services.
Checked 1 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 1 contacts.
Checked 1 contact groups.
Checked 24 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 1 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 0
Things look okay - No serious problems were detected during the pre-flight check# systemctl status nagios
Code: Select all
● nagios.service - LSB: Starts and stops the Nagios monitoring server
Loaded: loaded (/etc/rc.d/init.d/nagios)
Active: active (exited) since Mon 2016-11-14 14:02:47 GMT; 24min ago
Docs: man:systemd-sysv-generator(8)
Process: 2533 ExecStop=/etc/rc.d/init.d/nagios stop (code=exited, status=0/SUCCESS)
Process: 2538 ExecStart=/etc/rc.d/init.d/nagios start (code=exited, status=0/SUCCESS)
Nov 14 14:02:47 localhost.localdomain systemd[1]: Starting LSB: Starts and stops the Nagios monitoring server...
Nov 14 14:02:47 localhost.localdomain nagios[2538]: Starting nagios: done.
Nov 14 14:02:47 localhost.localdomain systemd[1]: Started LSB: Starts and stops the Nagios monitoring server.
# /usr/local/nagios/libexec/check_nrpe -H 127.0.0.1
Code: Select all
NRPE vnrpe-3.0BUT
# journalctl -xe
Nov 14 14:02:47 localhost.localdomain nagios[2558]: Nagios 4.2.2 starting... (PID=2558)
Nov 14 14:02:47 localhost.localdomain nagios[2558]: Local time is Mon Nov 14 14:02:47 GMT 2016
Nov 14 14:02:47 localhost.localdomain nagios[2558]: LOG VERSION: 2.0
Nov 14 14:02:47 localhost.localdomain nagios[2558]: qh: Failed to init socket '/usr/local/nagios/var/rw/nagios.qh'. bind() failed: No such file or directory
Nov 14 14:02:47 localhost.localdomain nagios[2558]: Error: Failed to initialize query handler. Aborting
and Web interface obviously is down too
WEB Interface: Error: Could not read object configuration data!
Could you please clarify what is the issue, sins I'm following installation guide and using Latest available distribution ?