Page 1 of 1

Nagios api

Posted: Wed Mar 21, 2018 7:54 am
by nagios_ant
hi Team,
we have micro-services based architecture and we use Atlassian bamboo as our build and deployment tool.
We are planing to automate a process, in which when ever a new service is created in the build tool, it will first check whether the existing service( server+port) is configured in nagios, and if the service is not in nagios, this will automatically create nagios service.

Hope we can use the above method with the help of nagios api.
team, Any other options or suggestions

thanks

Re: Nagios api

Posted: Wed Mar 21, 2018 4:00 pm
by npolovenko
Hello, @nagios_ant.
I'm not very familiar with Atlassian bamboo but looks like the process comes down to:
A) Checking whether a service with a given name already exists in Core Configurations Manager.
I suggest this query:
http://nagiosadmin:[email protected] ... erviceName

B) If it doesn't exist, create a new one. You can find the API commands you need in Help/ObjectsReference menu.
Untitled.png

Reference:
https://labs.nagios.com/2014/06/19/expl ... -7-part-1/
https://assets.nagios.com/downloads/nag ... gement.pdf