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.
Nagios service won't start
Re: Nagios service won't start
Please execute the following:
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
And post the result.
By not including the path to nagios.cfg, your command is looking for the file in your /root directory and not finding it there.
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
And post the result.
By not including the path to nagios.cfg, your command is looking for the file in your /root directory and not finding it there.
-
- Posts: 2
- Joined: Fri Sep 08, 2017 7:16 am
Re: Nagios service won't start
Yes you are right, the command says no such file.
[root@saadat ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
-bash: /usr/local/nagios/bin/nagios: No such file or directory
[root@saadat ~]# /usr/local/nagios/bin/nagios -v nagios.cfg
-bash: /usr/local/nagios/bin/nagios: No such file or directory
Please tell me what went wrong during the installation and how should i resolve this.
Thanks
[root@saadat ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
-bash: /usr/local/nagios/bin/nagios: No such file or directory
[root@saadat ~]# /usr/local/nagios/bin/nagios -v nagios.cfg
-bash: /usr/local/nagios/bin/nagios: No such file or directory
Please tell me what went wrong during the installation and how should i resolve this.
Thanks
Re: Nagios service won't start
Please run the following two commands and post your result:
Code: Select all
find / -name nagios
find / -name nagios.cfg
Re: Nagios service won't start
Remove the nagios.pid file that you created. This file should never be created manually. Then run the following command as root:
The first error you received:
was to be expected. You ran:
while nagios wasn't running and the error basically reported that.
Code: Select all
service nagios start
Code: Select all
No lock file found in /var/run/nagios/nagios.pid
Code: Select all
service nagios status
-
- Posts: 49
- Joined: Thu Feb 14, 2013 9:32 am
Re: Nagios service won't start
I got the same issue when I installed Graphios.
Graphios created a bew nagios.cfg file and something was wrong in it, so I restored the original nagios.cfg and it fixed the issue.
While I was digging into the root cause, I found that the file /usr/loncal/nagios/var/nagios.lock was't being updated. Maybe you should take a look on this file, and check its path on nagios.cfg as well:
Graphios created a bew nagios.cfg file and something was wrong in it, so I restored the original nagios.cfg and it fixed the issue.
While I was digging into the root cause, I found that the file /usr/loncal/nagios/var/nagios.lock was't being updated. Maybe you should take a look on this file, and check its path on nagios.cfg as well:
Code: Select all
lock_file=/usr/local/nagios/var/nagios.lock