Nagios upgrade from 5.6.x to 5.7.x changes API output
Nagios upgrade from 5.6.x to 5.7.x changes API output
We have seen at least one or two API changes that I cannot find in any document. The API call "servicestatus" has been changed between versions of Nagios XI. The return JSON used to return "status_text" as a key value but no longer. This appears to now be returned as "output" as the key. Programmatically looking for a key to inspect it's value fails and we have to update to the new key. We would like to know what other keys have been removed and/or changed to a new key
Re: Nagios upgrade from 5.6.x to 5.7.x changes API output
I have attached an example of the API changes we see...
You do not have the required permissions to view the files attached to this post.
Re: Nagios upgrade from 5.6.x to 5.7.x changes API output
Hello!
I can't pretend to know all the changes the API has received since 2019. Backward compatibility wasn't observed for a couple of code changes I saw during the time between 5.6.12 and 5.6.13, so there's probably some changes to the ways the data is presented.
At least our engineers have kept a detailed change log over the course of changing the software. The API documentation that ships in the current version accessible under Help => API Docs should be the most up-to-date and accurate API reference for the current version of the software.
I can't pretend to know all the changes the API has received since 2019. Backward compatibility wasn't observed for a couple of code changes I saw during the time between 5.6.12 and 5.6.13, so there's probably some changes to the ways the data is presented.
At least our engineers have kept a detailed change log over the course of changing the software. The API documentation that ships in the current version accessible under Help => API Docs should be the most up-to-date and accurate API reference for the current version of the software.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
Re: Nagios upgrade from 5.6.x to 5.7.x changes API output
As a customer who uses the API programmatically, there should be greater care taken to inform the Nagios community when there are basic changes to the API.
The Host Status - the most basic monitoring definition - was changed between version 5.6.6(returns value of name and status_text) and 5.7.4 (returns value of host_name and output).
This should be well advertised and not something the customer needs to search for. As you can see below, there really is nothing alerting us to this major change? Can you provide a complete list of changes to the API since 5.6.6?
Below is a list of the API changes since 5.6.12 which does not include the change mentioned above...
5.7.5 - 11/12/2020
Fixed renaming objects via PUT request in API with only a name change causing apply config issues [TPS#15156] -JO
Fixed parameter problem_has_been_acknowledged not working on hoststatus and servicestatus API endpoints [TPS#15256] -JO
Fixed issue with the parameter host_object_id (host_id works) not working with objects API calls [TPS#15263] -JO
Added Audit Log messages for REST API calls [TPS#6913] -SAW
Updated objects API to no longer convert XML to JSON for a more consistent output and always returns the same structure at any result size [TPS#14740] -JO
Fixed backend API using insecure login ticket (backend API is deprecated and will be removed in XI 6) [TPS#15087] -JO
Fixed issue with CORS policy for API endpoints -JO
5.6.12 - 02/27/2020
The Host Status - the most basic monitoring definition - was changed between version 5.6.6(returns value of name and status_text) and 5.7.4 (returns value of host_name and output).
This should be well advertised and not something the customer needs to search for. As you can see below, there really is nothing alerting us to this major change? Can you provide a complete list of changes to the API since 5.6.6?
Below is a list of the API changes since 5.6.12 which does not include the change mentioned above...
5.7.5 - 11/12/2020
Fixed renaming objects via PUT request in API with only a name change causing apply config issues [TPS#15156] -JO
Fixed parameter problem_has_been_acknowledged not working on hoststatus and servicestatus API endpoints [TPS#15256] -JO
Fixed issue with the parameter host_object_id (host_id works) not working with objects API calls [TPS#15263] -JO
Added Audit Log messages for REST API calls [TPS#6913] -SAW
Updated objects API to no longer convert XML to JSON for a more consistent output and always returns the same structure at any result size [TPS#14740] -JO
Fixed backend API using insecure login ticket (backend API is deprecated and will be removed in XI 6) [TPS#15087] -JO
Fixed issue with CORS policy for API endpoints -JO
5.6.12 - 02/27/2020
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Nagios upgrade from 5.6.x to 5.7.x changes API output
Hi @bpennin,
My apologies for any frustration, let me circle back with the development team for some clarification on the exact nature of the API changes between 5.6.x and 5.7.x and I will update you shortly.
Best Regards,
Benjamin Smith
Technical Support Manager
My apologies for any frustration, let me circle back with the development team for some clarification on the exact nature of the API changes between 5.6.x and 5.7.x and I will update you shortly.
Best Regards,
Benjamin Smith
Technical Support Manager
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: Nagios upgrade from 5.6.x to 5.7.x changes API output
Thank You Benjamin that would be great!
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Nagios upgrade from 5.6.x to 5.7.x changes API output
Hi @bpennin,
Sorry for the delay, waiting on a reply right now and I will follow up shortly.
Regards,
Benjamin
Sorry for the delay, waiting on a reply right now and I will follow up shortly.
Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
-
benjaminsmith
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: Nagios upgrade from 5.6.x to 5.7.x changes API output
HI,
I reached out to one of our developers and what caused the difference you're seeing is related to a code change around JSON data conversion. We no longer convert from XML to JSON in PHP, but convert the data directly from the array to JSON. The newer output better reflects the proper naming conventions.
Again, apologies for any inconvenience here, we have no plans to make any API changes until XI 6.0 ( coming in 2021 ).
Let me know if you have any other questions.
Regards,
Benjamin
I reached out to one of our developers and what caused the difference you're seeing is related to a code change around JSON data conversion. We no longer convert from XML to JSON in PHP, but convert the data directly from the array to JSON. The newer output better reflects the proper naming conventions.
Again, apologies for any inconvenience here, we have no plans to make any API changes until XI 6.0 ( coming in 2021 ).
Let me know if you have any other questions.
Regards,
Benjamin
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!