Nagios Error

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
zik
Posts: 26
Joined: Wed Feb 13, 2013 4:01 am

Nagios Error

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Error

Post 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?
zik
Posts: 26
Joined: Wed Feb 13, 2013 4:01 am

Re: Nagios Error

Post 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
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Nagios Error

Post 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.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
zik
Posts: 26
Joined: Wed Feb 13, 2013 4:01 am

Re: Nagios Error

Post by zik »

thank you very much for your answer I use fedora so what you advice me to do ?

All The Best
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Error

Post 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?
zik
Posts: 26
Joined: Wed Feb 13, 2013 4:01 am

Re: Nagios Error

Post 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
zik
Posts: 26
Joined: Wed Feb 13, 2013 4:01 am

Re: Nagios Error

Post 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
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios Error

Post 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
zik
Posts: 26
Joined: Wed Feb 13, 2013 4:01 am

Re: Nagios Error

Post by zik »

Thank you very much , the problem is fixed .

Many Thanks

All The Best
Locked