Page 1 of 2

Nagios Start FAILED

Posted: Tue Sep 20, 2016 1:35 am
by Kira1987
[root@NagiosServer ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.2.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-06-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!


#Please help me solve this issues.

Nagios Start FAILED

Posted: Tue Sep 20, 2016 2:39 am
by Kira1987
Hi !
Newly I'm trying to configure monitor server with CentOS 7. I installed Nagios-4.2.1 primarily. Before server restart the nagios service was run good. but after restarting the server Nagios Service failed start. please help me for correct. :!:

Nagios Core 4.2.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 09-06-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!

Re: Nagios Start FAILED

Posted: Tue Sep 20, 2016 9:42 am
by mcapra
Can you show us the contents of your /usr/local/nagios/etc/nagios.cfg file?

Can you also share the outputs of:

Code: Select all

ls -al /usr/local/nagios/var/
ls -al /usr/local/nagios/var/spool/

Re: Nagios Start FAILED

Posted: Thu Sep 22, 2016 5:58 am
by Kira1987
[root@NagiosServer Desktop]# ls -al /usr/local/nagios/var/
total 4
drwxr-xr-x 2 nagios nagios 30 Sep 22 08:33 .
drwxr-xr-x 9 root root 87 Sep 20 10:51 ..
-rw-r--r-- 1 nagios nagios 255 Sep 22 08:33 nagios.configtest
[root@NagiosServer Desktop]# ls -al /usr/local/nagios/var/spool/
ls: cannot access /usr/local/nagios/var/spool/: No such file or directory
[root@NagiosServer Desktop]#

--Thanks and waiting your reply.

Re: Nagios Start FAILED

Posted: Thu Sep 22, 2016 2:45 pm
by tmcdonald
Can you show us the contents of your /usr/local/nagios/etc/nagios.cfg file as requested by @mcapra in his last post?

Re: Nagios Start FAILED

Posted: Fri Sep 23, 2016 6:50 am
by Kira1987
Here with I attached the file.

Re: Nagios Start FAILED

Posted: Fri Sep 23, 2016 10:45 am
by rkennedy
I believe something failed during install. Just compared this to a stock system I spun up yesterday -

Code: Select all

check_result_path=/usr/local/nagios/var/spool/checkresults

Code: Select all

root@localhost:/usr/local/nagios/etc# ls -al /usr/local/nagios/var
total 100
drwxrwxr-x 5 nagios nagios  4096 Sep 23 10:42 .
drwxr-xr-x 9 root   root    4096 Sep 20 11:49 ..
drwxrwxr-x 2 nagios nagios  4096 Sep 22 23:59 archives
-rw-r--r-- 1 nagios nagios    34 Sep 22 14:27 nagios.configtest
-rw-r--r-- 1 nagios nagios     5 Sep 22 14:18 nagios.lock
-rw-r--r-- 1 nagios nagios  1782 Sep 23 10:27 nagios.log
-rw-r--r-- 1 nagios nagios     6 Sep 23 09:47 nrpe.pid
-rw-r--r-- 1 nagios nagios 12663 Sep 22 14:27 objects.cache
-rw-r--r-- 1 nagios nagios 12663 Sep 22 14:27 objects.precache
-rw------- 1 nagios nagios 13147 Sep 23 10:27 retention.dat
drwxrwsr-x 2 nagios nagcmd  4096 Sep 22 14:27 rw
drwxr-xr-x 3 root   root    4096 Sep 20 11:34 spool
-rw-rw-r-- 1 nagios nagios 13580 Sep 23 10:42 status.dat
You are missing quite a bit of files / folders that should have been created. What instructions did you follow during install? It might be worth starting fresh, and follow our official documentation as these as they should work perfectly - https://assets.nagios.com/downloads/nag ... Source.pdf

Re: Nagios Start FAILED

Posted: Mon Sep 26, 2016 6:20 am
by Kira1987
Dear Sir,
My problem is same.
I followed you given official document step by step. The problem is when fresh installation the service working good. but after rebooting system it will not work. same error. please kindly help me. The system running on VM on server 2012.
New Bitmap Image.jpg
New Bitmap Image (2).jpg

Re: Nagios Start FAILED

Posted: Mon Sep 26, 2016 2:44 pm
by tgriep
Can you login as root to the Nagios server, run the following commands and post the output?

Code: Select all

ls -al /usr/local/nagios/
ls -al /usr/local/nagios/var/
ls -al /usr/local/nagios/var/spool/

Re: Nagios Start FAILED

Posted: Tue Sep 27, 2016 7:38 am
by nozlaf
have you by any chance followed a guide that told you how to setup a ram disk to give better performance in nagios?