Which cfg files are used ?

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
tellyfilms
Posts: 5
Joined: Wed Apr 13, 2011 9:30 am

Which cfg files are used ?

Post by tellyfilms »

I have created a Jump Start installation on an Amazon Elastic Cluster.

There are two lots of cfg files, /usr/local/nagios/etc/objects and /etc/nagios3/objects.

Can someone explain which directory is used as the th second directory above appear to be used by the Nagios Core and the first directory is used by Nagios Administrator.

Any help would be much appreciated.
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Which cfg files are used ?

Post by tonyyarusso »

a Jump Start installation
Could identify a bit more what this is and where you got it? I take it this is some sort of pre-packaged virtual appliance for EC2? What operating system is this built on? From the looks of it, I'm guessing Debian.
Can someone explain which directory is used
One thing you can do is use grep to find the running nagios process and see which config file it is using, and then read that file to determine which configs are being loaded, like this:

Code: Select all

[root@demo ~]# ps aux | grep nagios.cf | grep -v grep
nagios   24231  0.0  0.2  13436  1636 ?        Ssl  Apr12   0:35 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
tellyfilms
Posts: 5
Joined: Wed Apr 13, 2011 9:30 am

Re: Which cfg files are used ?

Post by tellyfilms »

Thank you for getting back to me.

The installation is a Jump Box installation on Debian. When I ran the ps command as suggested I got the following.

Code: Select all

root@nagios3:/etc/init.d# ps aux | grep nagios.cf | grep -v grep
nagios   32374  0.0  0.1  11012  1080 ?        Ssl  15:38   0:00 /usr/local/nagios/bin/nagios -d /usr/local/nagios/etc/nagios.cfg
nagios   32455  0.0  0.2   4784  1284 ?        SNs  15:39   0:00 /usr/sbin/nagios3 -d /etc/nagios3/nagios.cfg
These are phsycally different files, when I change one the admin tool shows a change and it does not show up in the nagios core page.
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Which cfg files are used ?

Post by tonyyarusso »

Something's wrong with how Nagios is being run then - only one of those two processes should exist. Your best bet would be to contact JumpBox to find out how it is intended to be configured, since this is a custom setup by them. See http://www.jumpbox.com/support.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
Locked