Hi all,
I have been trying to get the new Check_XML wizard to work with pulling information out of a firewall API
the URL I have on a HTTPS page returns this in a browser
<response status="success">
<result>
<Gateway>
<name>VPN-Gateway</name>
<CurrentUsers>55</CurrentUsers>
<PreviousUsers>933</PreviousUsers>
</Gateway>
<TotalCurrentUsers>55</TotalCurrentUsers>
<TotalPreviousUsers>933</TotalPreviousUsers>
</result>
</response>
after running the wizard it -u 'https://URL' -k '/result/Gateway/CurrentUsers' -w 1900 -c 1950
The Run check command says:
UNKNOWN - Could not find the key or the value is not numeric
I think the way I put the syntax for drilling into the XML tree needs to be different from '/result/Gateway/CurrentUsers'
I have tried with Square brackets around each level, with double quotes etc...
Could anyone point out what I am doing wrong please?
The tooltip isn't great as it assumes I have more coding knowledge (And time on my hands to fill in the gaps)
new check_XML functionality help please
Re: new check_XML functionality help please
Try:
This does deserve better examples and documentation. We'll look into that.
Code: Select all
./check_xml.php -u http://url -k result[Gateway][CurrentUsers] -w 1900 -c 1950As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Re: new check_XML functionality help please
Thank you
I can confirm your syntax has worked fine for me now
I can confirm your syntax has worked fine for me now
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: new check_XML functionality help please
Great!curlypete wrote:Thank you
I can confirm your syntax has worked fine for me now
Locking thread