Nagios XI Rest API to disable event handlers

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
FrontlineIT
Posts: 94
Joined: Tue Jul 26, 2016 8:46 am

Nagios XI Rest API to disable event handlers

Post by FrontlineIT »

Good morning,

I'm starting to look into the Nagios XI Rest API that's available so that I can disable/enable event handlers in Nagios XI. I was wondering if I could get some assistance with this and if there are there any Powershell script examples for disabling/enabling event handlers in Nagios XI using the Rest API?

Thanks ahead of time
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Rest API to disable event handlers

Post by lmiltchev »

You could submit a core command to disable event handlers via the REST API in Nagios XI. See the example below:

Code: Select all

# curl -XPOST "http://x.x.x.x/nagiosxi/api/v1/system/corecommand?apikey=xxx" -d "cmd=DISABLE_EVENT_HANDLERS"
{"cmd":"DISABLE_EVENT_HANDLERS","success":"Command submitted"}
Verifying that event handlers are disabled in the GUI:
example01.PNG
https://assets.nagios.com/downloads/nag ... mand_id=48

You can also enable event handlers by running:

Code: Select all

# curl -XPOST "http://x.x.x.x/nagiosxi/api/v1/system/corecommand?apikey=xxx" -d "cmd=ENABLE_EVENT_HANDLERS"
You can view the REST API documentation under the Help menu in Nagios XI.

Hope this helps.
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked