Page 1 of 2

Further API functions

Posted: Wed Jan 17, 2018 1:30 am
by gomatze
Good Morning,

In our Environment there are constantly changing IP Addresses and Address ranges as the Plant gets bigger over Time.
Our System is able to detect changes in the Host<->IP configurations by a process which compares the daily renewed /etc/Hosts which Comes from the Main Server with the Configuration of NagiosXI and give us notification about the change.

Actually we are reconfiguring the IP's of a changed Hostconfig manually.

What i would like to have is a API Call that can replace the actual IP for a Host with a new Value.
I could not find a similiar Topic or Post in the Forum (yet) so i would like to ask if something like that is on the Roadmap...

Re: Further API functions

Posted: Wed Jan 17, 2018 12:46 pm
by npolovenko
Hello, @gomatze. There'are more API features coming in XI 5.5 but they haven't been disclosed yet. Would you like me to submit a feature request for this feature specifically? It may or may not get approved by our devs.

Re: Further API functions

Posted: Sun Jan 21, 2018 1:28 pm
by gomatze
please do so, it would make our Job easier for we could automate some work..

Re: Further API functions

Posted: Mon Jan 22, 2018 2:19 pm
by dwhitfield
You can already do this, in a couple of different ways:
1) You can set it not to check the API entries. This is dangerous, but if you force the update, then it will get updated in the db and ultimately the configs.
2) You can just submit the full host. If you know what the host info is, then setting the IP becomes a single variable.

Please let us know if you have any additional questions about these options.

Re: Further API functions

Posted: Mon Jan 22, 2018 8:26 pm
by gomatze
I'm not very fond of Workarounds. An actual API Call solution would be great.

Re: Further API functions

Posted: Tue Jan 23, 2018 2:28 pm
by dwhitfield
npolovenko wrote: There are more API features coming in XI 5.5 but they haven't been disclosed yet.
Unfortunately, the above is true. We do not yet have an internal beta of 5.5, and I cannot say when there will be one. We are targeting April for release at the moment. You'll want to check https://assets.nagios.com/downloads/nag ... NGES-5.TXT to see if it was included.

Re: Further API functions

Posted: Thu Mar 08, 2018 11:33 pm
by krutaw
gomatze wrote:I'm not very fond of Workarounds. An actual API Call solution would be great.
I have to agree, a PATCH method would be preferable. When thinking about a REST API, it should truly support all of the standard methods, especially when the API is the only major selling feature for some of us.

Re: Further API functions

Posted: Fri Mar 09, 2018 2:20 pm
by cdienger
Thanks for the input @krutaw . Solutions over workaround are always a preferred way to go and the API will continue to be a focus of improvement.

Re: Further API functions

Posted: Wed Mar 14, 2018 10:37 am
by krutaw
cdienger wrote:Thanks for the input @krutaw . Solutions over workaround are always a preferred way to go and the API will continue to be a focus of improvement.
I had a thought about this... What might lead to faster improvements is better documentation regarding customization of the API itself. For instance, having a start to finish example of how to add a custom API endpoint might lead to some very interesting advancements from the community that could (at the discretion of Nagios of course) be included in the XI product. Just a thought.

Re: Further API functions

Posted: Thu Mar 15, 2018 9:22 am
by tmcdonald
Regarding the documentation, have you seen the Help > Custom API Endpoints section in XI? It goes over how to write a custom endpoint, but if you'd like to see more info, what specifically would be helpful? i.e. video series, more examples, deeper dive, etc. Would something like this (which is for wizards) be nice? https://assets.nagios.com/downloads/nag ... ios-XI.pdf