Page 1 of 1

CONFIG FILE NIGHTMARE!!!!!

Posted: Mon Jun 03, 2013 9:01 am
by ofadl
Hello everyone and thanks for looking,

I recently just finished downloading Nagios core on my ubuntu server, and am having trouble adding/editing switches. I have been following this http://nagios.sourceforge.net/docs/nagi ... uters.html for configuration, and did everything it asked me to do. Now as i go to restart it, i get
"Error: Cannot open config file /etc/nagios3/objects/switch.cfg' for reading: No such file or directory Error processing object config files"

Anyone know how to fix this? thanks in advance for your help

Re: CONFIG FILE NIGHTMARE!!!!!

Posted: Mon Jun 03, 2013 11:07 am
by slansing
First, just to check the file is located at the following location if you do an ls or ll of that directory correct?:

Code: Select all

/etc/nagios3/objects/switch.cfg
Second, did you verify your config files?:

http://nagios.sourceforge.net/docs/3_0/ ... onfig.html

Re: CONFIG FILE NIGHTMARE!!!!!

Posted: Mon Jun 03, 2013 11:32 am
by ofadl
thanks for the response

im not entirely sure by what you ment in the first step but i did an ls and and nagios.cfg is there

secondly, the check configuration works perfectly, and no errors are coming up

Re: CONFIG FILE NIGHTMARE!!!!!

Posted: Mon Jun 03, 2013 12:47 pm
by slansing
You should be looking for the switches.cfg file, presumably in:

Code: Select all

/etc/nagios3/objects/

Re: CONFIG FILE NIGHTMARE!!!!!

Posted: Mon Jun 03, 2013 12:52 pm
by ofadl
im sorry im not too familiar with all the commands, what exactly do i do?

Re: CONFIG FILE NIGHTMARE!!!!!

Posted: Mon Jun 03, 2013 12:55 pm
by abrist
Try:

Code: Select all

ls -la /etc/nagios3/objects/
ls -la /etc/nagios3/

Re: CONFIG FILE NIGHTMARE!!!!!

Posted: Mon Jun 03, 2013 1:14 pm
by ofadl
ok so i try the first command and i get a " cannot acesss no file or directory"

and the second command works

Re: CONFIG FILE NIGHTMARE!!!!!

Posted: Mon Jun 03, 2013 4:31 pm
by scottwilkerson
Can you show the output of that command? As well as

Code: Select all

cat /etc/nagios3/nagios.cfg

Re: CONFIG FILE NIGHTMARE!!!!!

Posted: Mon Jun 03, 2013 4:32 pm
by sreinhardt
Please post the output of the commands so that we can best help. Most likely if you are failing the first command, the user you are running as or the nagios user does not have permission to this directory and its files.

Code: Select all

ls -la /etc/nagios3/objects/
ls -la /etc/nagios3/
cat /etc/passwd | grep nag