Services REST API not displaying custom variables ...

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Services REST API not displaying custom variables ...

Post by vishfx »

Hi NagiosXI Team,

We are running Nagios XI 5.4.13 VMware Image.

We are fetching All Services data through the REST call ( http://YY.YY.YY.YY/nagiosxi/api/v1/obje ... X&pretty=1 )

However, we noticed that even though Free/Custom Variables defined for the Service are seen in NagiosXI UI & Service.cfg , the same Free/Custom Variables are not showing up in the JSON response.

Are we missing anything here ?

Kindly advise.

Regards,
Vish.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Services REST API not displaying custom variables ...

Post by lmiltchev »

The free/custom variables haven't been added to the REST API. I filed an internal feature request for adding the variables to the REST API. Please keep in mind that the decision to implement the enhancement is at the sole discretion of our development team. Meanwhile, you should be able to access this information via the nagios json.

Examples:

Code: Select all

http://<ip>/nagios/jsonquery.html

Code: Select all

http://<ip>/nagios/cgi-bin/objectjson.cgi?query=host&hostname=localhost
Be sure to check out our Knowledgebase for helpful articles and solutions!
vishfx
Posts: 134
Joined: Tue Apr 24, 2018 12:30 pm

Re: Services REST API not displaying custom variables ...

Post by vishfx »

Thanks lmiltchev.

I guess Nagios JSON should work out for us for now.

Appreciate the prompt response.

Regards,
Vish.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Services REST API not displaying custom variables ...

Post by lmiltchev »

Great! I will be locking this topic then, and marking it as resolved. If you have any more questions/issues, please start a new thread.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked