Nagios service won't start
Posted: Fri Sep 08, 2017 7:40 am
Hello Everyone. Posting here for the first time. So i set up nagios core on a fresh server installation running Centos 6.7.
Did it using this "https://www.unixmen.com/install-and-con ... -rhel-6-4/" installation guide. Things that i installed befor nagios were PHP and Mysqld. The nagios installation was completed without any errors. After the installation when i tried to start nagios as root i got the following output:
[root@saadat ~]# service nagios status
No lock file found in /var/run/nagios/nagios.pid.
Went to the /var/run/nagios/ directory and created the nagios.pid file by myself.
Then tried to check the status of nagios and found :
[root@saadat ~]# service nagios status
nagios is not running
Then tried to start nagios and got nothing but this:
[root@saadat ~]# service nagios start
Starting nagios:[root@saadat ~]# (Nothing happens after this)
On the other hand when i accessed nagios from the browser "ServerIP/nagios" it opens the main page of nagios but it says Nagios Core not running with an X mark.
On clicking anything on the left menu i get the page with the error:
Whoops!
Error: Could not read object configuration data!
Here are some things you should check in order to resolve this error:
Verify configuration options using the -v command-line option to check for errors.
Check the Nagios log file for messages relating to startup or status data errors.
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at https://www.nagios.org.
Upon rinning the command "nagios -v nagios.cfg" i get the output:
Nagios Core 4.3.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-05-09
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Error: Cannot open main configuration file '/root/nagios.cfg' for reading!
Error processing main config file!
What might be the error in this configuration?? No idea what to do now. Please seniors suggest something to me in this difficult time
Thanks in advance.
Did it using this "https://www.unixmen.com/install-and-con ... -rhel-6-4/" installation guide. Things that i installed befor nagios were PHP and Mysqld. The nagios installation was completed without any errors. After the installation when i tried to start nagios as root i got the following output:
[root@saadat ~]# service nagios status
No lock file found in /var/run/nagios/nagios.pid.
Went to the /var/run/nagios/ directory and created the nagios.pid file by myself.
Then tried to check the status of nagios and found :
[root@saadat ~]# service nagios status
nagios is not running
Then tried to start nagios and got nothing but this:
[root@saadat ~]# service nagios start
Starting nagios:[root@saadat ~]# (Nothing happens after this)
On the other hand when i accessed nagios from the browser "ServerIP/nagios" it opens the main page of nagios but it says Nagios Core not running with an X mark.
On clicking anything on the left menu i get the page with the error:
Whoops!
Error: Could not read object configuration data!
Here are some things you should check in order to resolve this error:
Verify configuration options using the -v command-line option to check for errors.
Check the Nagios log file for messages relating to startup or status data errors.
Make sure you read the documentation on installing, configuring and running Nagios thoroughly before continuing. If all else fails, try sending a message to one of the mailing lists. More information can be found at https://www.nagios.org.
Upon rinning the command "nagios -v nagios.cfg" i get the output:
Nagios Core 4.3.2
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 2017-05-09
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Error: Cannot open main configuration file '/root/nagios.cfg' for reading!
Error processing main config file!
What might be the error in this configuration?? No idea what to do now. Please seniors suggest something to me in this difficult time
Thanks in advance.