Page 1 of 1
Nagios API free variables
Posted: Thu Oct 14, 2021 3:19 pm
by jkimmel
Is it possible to query or list free variables via the API? I read a post that adding &customvars=1 would list, however I am not seeing them. We are running Nagios XI 5.8.4. I usually just curl then I parse using jq, but I am open if there is a way to search via the API as well.
Thanks!
John
Re: Nagios API free variables
Posted: Thu Oct 14, 2021 3:25 pm
by jkimmel
My curl was messed up I am able to get custom fields now, but is there a built in way to search and parse?
Re: Nagios API free variables
Posted: Fri Oct 15, 2021 10:12 am
by benjaminsmith
Hi jkimmel,
You can build limited queries in the API using the filter parameters. However, if you need to parse and search the JSON output, that is usually handled by the script itself.
Let us know if you have more questions
--Benjamin