[Xymon] SOAP test

Benjamin Boudoir benjamin.boudoir at eeple.fr
Tue Jul 24 17:20:20 CEST 2012


Le mardi 24 juillet 2012 16:22:54, Mario Andre Panza a écrit :
> Hello all,
> 
> I need to monitor some soap URLs and I´m not getting success on it.
> Does someone know how to create the request xml file for the SOAP test in
> xymon?
> Is there someone here who has a sample soap test to share?
> 
> 
> Thanks in advance,
> Mario Andre.

Hello,

You can do it by some way :
The http test may be sufficent  (just add a http://domain.tld/mysoap.xml in 
you're bb-hosts file).

But if you wanted to test the methods, you can make a script that check a know 
value of one of theses methods (hint : try to check the last method, you'll 
know if the xml file is fully loaded) and return an alert if it's not true.

In bash, this will make something like :

-----------------------------
#!/bin/bash

COLUMN=soaptest

function soap_test {
   [execute a soap method here]
}

knowvalue=whatever
mytest="$(soap_test)"

if [ "$mytest" = "$knownvalue" ]
then
	MSG="Seems good"
	COLOR="green"
else
	MSG="I've got $mytest but $knownvalue is expected. Is there a problem?"
	COLOR="red"
fi

$BB $BBDISP "status $MACHINE.$COLUMN $COLOR `date`                                                                                                                                                                                                 
                                                                                                                                                                                                                                                   
${MSG}                                                                                                                                                                                                                                             
"
-----------------------------

For my own, I don't have this sort of soap test script* and I don't think bash 
would be a good choice (never heard of a cli tool for SOAP) but something like 
this will work.

* but a python script launched once a day by a cron (because of a limits on 
this API) that export data in a file checked by a bash script that check and 
format output for Xymon.

-- 
Benjamin Boudoir
Melty Network / Eeple
Administrateur Système
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20120724/c498889d/attachment.sig>


More information about the Xymon mailing list