Further API functions

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
User avatar
gomatze
Posts: 64
Joined: Mon Jan 09, 2017 12:33 am
Location: Duesseldorf, Germany

Further API functions

Post 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...
HOMO SUM HUMANI NIHIL A ME ALIENUM PUTO
npolovenko
Support Tech
Posts: 3457
Joined: Mon May 15, 2017 5:00 pm

Re: Further API functions

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
gomatze
Posts: 64
Joined: Mon Jan 09, 2017 12:33 am
Location: Duesseldorf, Germany

Re: Further API functions

Post by gomatze »

please do so, it would make our Job easier for we could automate some work..
HOMO SUM HUMANI NIHIL A ME ALIENUM PUTO
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Further API functions

Post 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.
User avatar
gomatze
Posts: 64
Joined: Mon Jan 09, 2017 12:33 am
Location: Duesseldorf, Germany

Re: Further API functions

Post by gomatze »

I'm not very fond of Workarounds. An actual API Call solution would be great.
HOMO SUM HUMANI NIHIL A ME ALIENUM PUTO
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: Further API functions

Post 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.
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Re: Further API functions

Post 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.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: Further API functions

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
krutaw
Posts: 60
Joined: Wed Jul 31, 2013 6:30 pm

Re: Further API functions

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Further API functions

Post 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
Former Nagios employee
Locked