Page 1 of 1

command line enabling/disabling checks and notifications

Posted: Wed Apr 09, 2014 8:39 am
by kendallchenoweth
As part of a event handler script on an HA nagios XI server pair, I want to write a script that takes a list of hostnames and enables notification and active checks for all services and the host itself. This will be run from the inactive failover Nagios XI server upon determining that the active Nagios XI server is not running properly.

This script can run on localhost. I assume that this script will probably use wget or curl to access the web interface and is a variation on the url below. Can you assist me with the URL to enable and disable notifications and active checks? Thanks!

https://<host>/nagiosxi/includes/components/xicore/status.php?show=hostdetail&host=rubyext-00-ls#

Re: command line enabling/disabling checks and notifications

Posted: Wed Apr 09, 2014 5:02 pm
by slansing
I think you would definitely want to look at using external commands to push directly to the Nagios command pipe, if you have specific questions on them let us know, here is a bit of reading:

http://nagios.sourceforge.net/docs/3_0/extcommands.html
http://theurbanpenguin.com/wp/?p=2019