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.
Adding/removing services via Nagios API
Re: Adding/removing services via Nagios API
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!