Page 1 of 1

Adding customvars support for hoststatus/servicestatus API

Posted: Tue Sep 17, 2019 2:22 pm
by gzaloprgm
Hi,
I was wondering if you are planning on officially adding "customvars=1" support for the hoststatus/servicestatus API endpoints. We are trying to display custom variable information from the API into a NOC-like view inside Nagios Fusion.

It shouldn't be that hard (copying parts of the code from utils-xmlobjects to utils-xmlstatus, changing object_id to host/service_object_id seems to work), but there might be some posible optimizations to avoid doing a query for each host/service.

Thanks, Gonzalo

Re: Adding customvars support for hoststatus/servicestatus A

Posted: Tue Sep 17, 2019 3:23 pm
by benjaminsmith
Hello Gonzalo,

That functionality was added in Nagios XI 5.6. What version are you currently using?
customvars.png

Re: Adding customvars support for hoststatus/servicestatus A

Posted: Tue Sep 17, 2019 8:08 pm
by gzaloprgm
Hi
I'm using latest XI (5.6.6), and that option is available for objects/host and objects/service endpoints but not for objects/hoststatus nor objects/servicestatus (the ones I need).

Thanks, Gonzalo

Re: Adding customvars support for hoststatus/servicestatus A

Posted: Wed Sep 18, 2019 6:26 am
by scottwilkerson
gzaloprgm wrote:Hi
I'm using latest XI (5.6.6), and that option is available for objects/host and objects/service endpoints but not for objects/hoststatus nor objects/servicestatus (the ones I need).

Thanks, Gonzalo
Yes you would need to make multiple API calls