Monitoring XML web services?


#1

Hi all,

Is there any way (natively or via plugin) to monitor values in a http-served XML file? eg:
url = webserver/results.xml

<xml>
<record>
<value1>123</value1>
<value2>345</value2>
<value3>444</value3>
</record>
</xml>

Say I wanted to check what the value of value3 was and see if it has breached warning or critical thresholds…? I read somewhere that check_http could do regex, but my regex is very rusty, and I couldn’t work out how to do it…

Any help is rewarded with many beers!

Cheers,
Brett


#2

Hi BBenzie, team

Did you manage to find an solution to your problem?

I have a similar situation where all my systems can be monitored by SNMP, except the CDN (Content Delivery Networks), which uses the REST model to provide statistics through HTTP, and the multiple real-time variables are in XML format.
See an example at the bottom of this message, the variables I´d like to monitor are , and as a minimum.

Is there any Nagios plugin able to read content from XML, received through an HTTP request?

Kind regards,

Fernando

<?xml version="1.0" encoding="UTF-8"?>

<accessGroup id=“12345” name="My Access Group"
xsi:noNamespaceSchemaLocation=
https://mediaportal.level3.com/api/v1.0/schema/cachingRTM"
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”>
CDNPortal-1270071184562-
8650
2010-02-01 00:00 +0000
/12345


184
295.83
0.13
55.94
1.54
0
6.59
6.59
1.28
86.25
0.00
0.00


1.57
2.93
0
2.4
0
0
0
0
0.03
45.43
0.00
0.00



#3

use regexps in check_http (maybe multiple times to read 3 different values?) or write your own plugin… fetch the data with lynx, parse the result and return it to nagios.