Page 1 of 1

Editing Hosts/Services Config Files

Posted: Wed Oct 03, 2012 7:29 am
by maladd3
I need to make some changes on the "notification_interval" setting for most all of my hosts and services. I'm using a perl script to edit all of the .cfg files to what I need, but I noticed the comments at the top of each config that read:

# --DO NOT EDIT THIS FILE BY HAND--
# Nagios QL will overwrite all manual settings during the next update

This isn't very helpful for me seeing as I have a ton of hosts and services to change. It will take me hours to do it on the web interface. Is there a way around this without doing it on the web interface?

Re: Editing Hosts/Services Config Files

Posted: Wed Oct 03, 2012 7:40 am
by scottwilkerson
In the 2012RC4 we have added a Bulk Modification tool to the Core Config Manager that works wonderfully for making these kinks of changes.
http://labs.nagios.com/2012/09/11/nagio ... blic-beta/

An alternate way would be to copy the cfg's to a new sub directory of /usr/local/nagios/etc/ and make the changes as you have to the files, then you can import them from the Core Config Manager choosing to overwrite database.
configure -> CCM -> Tools -> Import config files

Re: Editing Hosts/Services Config Files

Posted: Wed Oct 03, 2012 9:39 am
by maladd3
That worked, thank you for your help.