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
Nagios XI Rest API to disable event handlers
-
FrontlineIT
- Posts: 94
- Joined: Tue Jul 26, 2016 8:46 am
Re: Nagios XI Rest API to disable event handlers
You could submit a core command to disable event handlers via the REST API in Nagios XI. See the example below:
Verifying that event handlers are disabled in the GUI:
https://assets.nagios.com/downloads/nag ... mand_id=48
You can also enable event handlers by running:
You can view the REST API documentation under the Help menu in Nagios XI.
Hope this helps.
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"}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"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!