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¬ification_interval=5¬ification_period=24x7¬ifications_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¬ification_interval=5¬ification_period=24x7¬ifications_enabled=1&applyconfig=1"
Thanks,
Jeff
disable/enable notifications via rest api
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: disable/enable notifications via rest api
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.
-
matson-itops
- Posts: 133
- Joined: Wed Nov 18, 2015 11:19 pm
Re: disable/enable notifications via rest api
any hope of getting api to disable / enable service checks?
-
kyang
Re: disable/enable notifications via rest api
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/
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/