Adding/removing services via Nagios API

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
haile711
Posts: 197
Joined: Thu May 28, 2015 7:36 am

Adding/removing services via Nagios API

Post by haile711 »

To support,

I have couple nagios servers, and I have all the configuration setup under the "static" directory for easier to manage through automation. I was wondering if we can use the Nagios API to add/remove services under the static directory?

youtube tutorial from Nagios XI

https://www.youtube.com/watch?v=iXbSmaZ0PRE

Thank you very much for checking.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Adding/removing services via Nagios API

Post by lmiltchev »

No, you cannot use the REST API to add/remove hosts/services that reside in the static directory. These configs are not present in the database. That's why they are handled manually. If you want to add/remove hosts/services in the static, you would need to add/modify the configs (e.g. via a script), and restart nagios.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked