Page 1 of 1

Services REST API not displaying custom variables ...

Posted: Tue Jul 03, 2018 2:09 am
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.

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

Posted: Tue Jul 03, 2018 10:37 am
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

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

Posted: Tue Jul 03, 2018 9:26 pm
by vishfx
Thanks lmiltchev.

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

Appreciate the prompt response.

Regards,
Vish.

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

Posted: Thu Jul 05, 2018 8:50 am
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.