Page 1 of 1

Nagios Error

Posted: Wed Feb 13, 2013 6:20 am
by zik
Good Day ,

I have one problem with my server nagios because I delete the logs to free space , I can't start service give me one error message :
Reading configuration data...
Error in configuration file '/etc/nagios/nagios.cfg' - Line 471 (Check result path is not a valid directory)
Error processing main config file!

when I search I found that directory not valid check_result_path=/var/log/nagios/spool/checkresults , what I did in log I creat folder nagiso and inside It I creat folder spool
but when I must creat the directory check_result_path .

Can somone help me I will be thankful .

Many Thanks

Re: Nagios Error

Posted: Wed Feb 13, 2013 10:33 am
by slansing
Are you saying that you created a new directory for check results? And then changed it in the nagios.cfg file? What happens when you switch the results directory back to the original?

Re: Nagios Error

Posted: Wed Feb 13, 2013 1:50 pm
by zik
excuse me , what I did i went to /var/log/ after I creat folder nagios insid it I create folder spoole inside it I create a file checkresults but still give me the same error .

I think I did somthing wrong ?

Many Thanks

Re: Nagios Error

Posted: Wed Feb 13, 2013 2:23 pm
by sreinhardt
/var/log/nagios/spool/checkresults should actually be a folder not a file, and it needs to be writable by nagios user and group. Are you using Ubuntu by chance? I only ask because the default for CentOS and RHEL is /usr/local/nagios/var/spool/checkresults.

Re: Nagios Error

Posted: Wed Feb 13, 2013 5:54 pm
by zik
thank you very much for your answer I use fedora so what you advice me to do ?

All The Best

Re: Nagios Error

Posted: Wed Feb 13, 2013 5:58 pm
by slansing
We're glad to help, as Sreinhardt pointed out:

Code: Select all

/var/log/nagios/spool/checkresults
Is supposed to be a folder not a file, it is where check result data is sent for processing. How did you install Nagios?

Re: Nagios Error

Posted: Wed Feb 13, 2013 6:24 pm
by zik
Normaly one year that I m working with nagios just in last days i can't start server nagios , gave me black screen when I m strated in single mode i found that logs are full 19 Go so I delete all logs so after the server started normaly but I can't start service nagios , I think from here come the problem when I delete all logs files .

All The Best

Re: Nagios Error

Posted: Thu Feb 14, 2013 8:37 am
by zik
I creat the dirctory now give another errer permission I forgot how to do it ?

Checking misc settings...
Error: Unable to write to temp_path ('/var/log/nagios/spool/checkresults') - Permission denied
Error: Unable to write to check_result_path ('/var/log/nagios/spool/checkresults') - Permission denied

I will be thankful if you can remember me how I can add Permission ?

Many Thanks

All The Best

Re: Nagios Error

Posted: Thu Feb 14, 2013 10:42 am
by slansing
/var/log/nagios/spool/checkresults should actually be a folder not a file, and it needs to be writable by nagios user and group
You must change the directory's to have permissions:

Please see this post for an explanation of permission changes, and how to make the directories writable for the nagios user.

http://stackoverflow.com/questions/1070 ... y-writable

Re: Nagios Error

Posted: Fri Feb 15, 2013 4:19 am
by zik
Thank you very much , the problem is fixed .

Many Thanks

All The Best