CONFIG FILE NIGHTMARE!!!!!

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
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

CONFIG FILE NIGHTMARE!!!!!

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

Re: CONFIG FILE NIGHTMARE!!!!!

Post 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
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: CONFIG FILE NIGHTMARE!!!!!

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

Re: CONFIG FILE NIGHTMARE!!!!!

Post by slansing »

You should be looking for the switches.cfg file, presumably in:

Code: Select all

/etc/nagios3/objects/
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: CONFIG FILE NIGHTMARE!!!!!

Post by ofadl »

im sorry im not too familiar with all the commands, what exactly do i do?
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: CONFIG FILE NIGHTMARE!!!!!

Post by abrist »

Try:

Code: Select all

ls -la /etc/nagios3/objects/
ls -la /etc/nagios3/
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
ofadl
Posts: 201
Joined: Mon Jun 03, 2013 8:57 am

Re: CONFIG FILE NIGHTMARE!!!!!

Post by ofadl »

ok so i try the first command and i get a " cannot acesss no file or directory"

and the second command works
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: CONFIG FILE NIGHTMARE!!!!!

Post by scottwilkerson »

Can you show the output of that command? As well as

Code: Select all

cat /etc/nagios3/nagios.cfg
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: CONFIG FILE NIGHTMARE!!!!!

Post 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
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.
Locked