Changes in NagRestConf not reflected in Nagios

105 views
Skip to first unread message

Spencer Riley

unread,
Jun 30, 2016, 3:10:48 PM6/30/16
to nagrestconf-users
Hello, 

First I would like to say thank you for all of your time and hard work on this application, I really appreciate how much of an undertaking this must be. 
Second I am a networking tech, so I would say my skill level is about 2/10 in linux.  Just enough to get into trouble.

I am running a fresh install of Centos 7 in a VM with Nagios 4.1.1 installed per the document : https://assets.nagios.com/downloads/nagioscore/docs/Nagios-Core-Installing-On-Centos7.pdf

NagRestConf installed without error, however when I add a host and attempt to apply changes I see nothing in the Nagios console.  I verified the cron job is present per your troubleshooting guide.  
I manually restarted Nagios to rule out cron job issues.

The log output from nagrestconf "apply and restart" is pointing to /local-nodes/mgmt/localhost2.cfg while I still see /usr/local/nagios/etc/nagios.cfg is pointing to cfg_file=/usr/local/nagios/etc/objects/commands.cfg  

I see where the install scripts commented out the nagios defintions in /etc/nagios/nagios.cfg    "- commented out by nagrestconf - cfg_file=/etc/nagios/objects/commands.cfg"
but I thought nagios was using /usr/local/nagios/etc/nagios.cfg
and I don't see the reference to the directories created by nagrestconf  ex. /etc/nagios/objects/local/local-nodes/mgmt/localhost.cfg

I feel like I am really close and just missing something obvious to someone more skilled.  Any assistance or direction would be greatly appreciated.

Thank you.

Mark Clarkson

unread,
Jul 1, 2016, 7:42:34 AM7/1/16
to nagrestconf-users

Hi Spencer,
Following the instructions at http://nagrestconf.smorg.co.uk/installguides/centos7.php would have installed Nagios 4.0.8. This would be easy to upgrade and will contain any Centos7-specific fixes. I nearly always prefer a slightly older version of a package over a manual installation as it makes life much easier going forward.

You have two choices: Re-install using the nagrestconf install guide, or read through http://nagrestconf.smorg.co.uk/documentation/configfiles.php and edit the configuration files. For example, nagctl.conf will need NAG_DIR changed from /etc/nagios to /usr/local/nagios/etc (I think).

If I needed nagios 4.1.1 for something specific (something unavailable or not fixed in 4.0.8) I would build an rpm so that nagios is integrated into the system rather than installed into /usr/local. I used to do build rpms for nagios before there were official centos/redhat packages, see https://github.com/mclarkson/smorg_nagios.

If you're not going to install nagios on any other boxes then it's probably easiest to read the configfile page and modify the config. If you are going to need more nagios boxes then use 4.0.8 - so just install again using the installguide. If you need 4.1.1 AND you'll need more nagios servers then make an RPM that installs into the same places - steal the original SPEC file for 4.0.8 and use it for 4.1.1 - but this can be a big task.

HTH
Mark
Reply all
Reply to author
Forward
0 new messages