Page 1 of 1

Changing a Contact for Oncall Purposes

Posted: Thu Mar 22, 2012 2:23 pm
by rdhall01
In nagios core we worte a few scripts to change the oncall person and update the corresponding method to notify them and then reload nagios. Is thee any functionality withing nagiosxi to accomplish the same thing? The scripts were in /usr/local/nagios/bin/ all we did was execute the script ./script_name person_on _call and the script changed the oncall info and reloaded nagios. Is there a way without having to have access to nagios core config manager and change contact info in there.

Re: Changing a Contact for Oncall Purposes

Posted: Thu Mar 22, 2012 3:52 pm
by mguthrie
There is a way to automate configuration changes in Nagios XI from the command line. It's not foolproof, but it works for most scenarios.

If you create a valid contact definition, you can drop the config file in the /usr/local/nagios/etc/import directory, and then run:

Code: Select all

/usr/local/nagiosxi/scripts/reconfigure_nagios.sh  
which is a command-line version of Apply Configuration. If you set that to a cron job you might be able to do what you're needing if the on-call rotation isn't on a regular schedule.