disable/enable notifications via rest api

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
jh129666
Posts: 98
Joined: Mon Feb 11, 2013 3:45 pm

disable/enable notifications via rest api

Post by jh129666 »

I found the below commands to disable/enable notifications via the rest API.

What are the rest API commands to disable/enable notifications for all services in a hostgroup, including the hosts?

curl -XPOST "http://192.168.x.x/nagiosxi/api/v1/conf ... u&pretty=1" -d "host_name=localhost&address=127.0.0.1&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin&notification_interval=5&notification_period=24x7&notifications_enabled=0&applyconfig=1"

curl -XPOST "http://192.168.x.x/nagiosxi/api/v1/conf ... u&pretty=1" -d "host_name=localhost&address=127.0.0.1&max_check_attempts=2&check_period=24x7&contacts=nagiosadmin&notification_interval=5&notification_period=24x7&notifications_enabled=1&applyconfig=1"



Thanks,

Jeff
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: disable/enable notifications via rest api

Post by scottwilkerson »

At present there isn't a single command that would do them all in bulk. You would need to process the command for each separately.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
matson-itops
Posts: 133
Joined: Wed Nov 18, 2015 11:19 pm

Re: disable/enable notifications via rest api

Post by matson-itops »

any hope of getting api to disable / enable service checks?
kyang

Re: disable/enable notifications via rest api

Post by kyang »

Hi matson-itops,

I think we were working on another thread about this question?

May we continue on that one so us techs don't answer a question twice?

Thanks for understanding!

Otherwise, there will be more API-end points coming in XI 5.5

https://www.nagios.com/roadmaps/
Locked