check_http and xml

Assaf Flatto nagios at flatto.net
Fri Jan 22 12:47:40 CET 2010


Hello

I am trying to verify the working of a web service which output is a xml 
content .

I thought that using the check_http -s or -e will help me do the 
verifications by searching for a string in the xml however when trying 
the test , the result comes back as a 404 ( classified info changed to 
XXX ).

 ./check_http -H some.service.con -s "xml" -u 
"xml.aspx?account_code=XXXXXXX&license_code=XXXXXXXXXXXXXXX&action=lookup&postcode=XXXXXX"

HTTP CRITICAL: HTTP/1.1 400 Bad Request - string not found - 163 bytes 
in 0.013 second response time |time=0.013409s;;;0.000000 size=163B;;;0

the output of curling (curl -D - $URL ) the page gives this :

Date: Fri, 22 Jan 2010 11:35:24 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
X-AspNet-Version: 2.0.50727
NextAction:
NextType:
Prompt:
ResultType:
Cache-Control: private
Content-Type: text/xml
Content-Length: 356

<?xml version="1.0" encoding="UTF-8"?>
<String Server="WEB11" Version="3.0" Date="22/01/2010 11:35:24" 
Duration="0.000s">
  <Schema Items="2">
    <Field Name="error_number" />
    <Field Name="message" />
  </Schema>
  <Data Items="1">
    <Item error_number="6" message="License key was not recognised" />
  </Data>


Does anyone have ideas on how to get xml content check ?
I looked at the nagiosexchange but did not find anything ( could be i 
was looking in the wrong place/context) .

Thanks

Assaf

------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list