command line enabling/disabling checks and notifications

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
kendallchenoweth
Posts: 195
Joined: Fri Sep 13, 2013 10:43 am

command line enabling/disabling checks and notifications

Post 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#
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: command line enabling/disabling checks and notifications

Post 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
Locked