WebService Monitoring SOAP Message Monitoring

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
User avatar
kvaldez
Posts: 27
Joined: Tue Aug 18, 2015 4:57 pm
Location: Lima/Peru

WebService Monitoring SOAP Message Monitoring

Post by kvaldez »

Hi,

I want to monitor, check if its up or down a web service.

Using any of this 2 url:

-Endpoint: http://localhost:8283/services/service1
or
-WSDL: http://localhost:8283/services/service1?wsdl

I found that a way of doing this is using the

Code: Select all

check_http
command, like this:

Code: Select all

# ./check_http -H localhost -p 8283 -u /services/service1?wsdl_type=xml
The output of that sentence is:

Code: Select all

HTTP CRITICAL: HTTP/1.1 500 Internal Server Error - 434 bytes in 0.069 second response time |time=0.069473s;;;0.000000 size=434B;;;0
It Gives HTTP CRITICAL but it also show the response time.

I need some help with this or if anyone know a better method for monitoring a web service please let me know.

Thanks a lot!

-Kvaldez
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: WebService Monitoring SOAP Message Monitoring

Post by Box293 »

Not sure if this helps:
http://jbrazile.blogspot.com.au/2008/07 ... lugin.html

Code: Select all

./check_http -S -k 'SOAPAction: ping' -r 'Current Status.*OK' -T text/xml -P '<s:envelope s="http://schemas.xmlsoap.org/soap/envelope/"><s:header/><s:body><ping/><s:Body><s:Envelope>' -t 10 -m 512 -p 8083 -H 192.168.1.254 -u /Services/Search/search.svc

HTTP OK HTTP/1.1 200 OK - 0.033 second response time |time=0.032722s;;;0.000000 size=897B;512;0;0
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
User avatar
kvaldez
Posts: 27
Joined: Tue Aug 18, 2015 4:57 pm
Location: Lima/Peru

Re: WebService Monitoring SOAP Message Monitoring

Post by kvaldez »

Hi,

Thanks for your reply.

It actually works!, by changing some parameters I could make the check_http command ping a web service to look for inactivity.

This is the command that I used:

Code: Select all

./check_http -H 192.168.0.99 -p 8283 -k 'SOAPAction:enviarDocumento' -T application/xml -u /services/ESB_LOG -P '<ping>STATUS</ping>
Output:

Code: Select all

HTTP OK: HTTP/1.1 200 OK - 262 bytes in 0.025 second response time |time=0.025234s;;;0.000000 size=262B;;;0
If the service or server is down the output will be this:

Code: Select all

CRITICAL - Socket timeout after 10 seconds
Thanks a lot!

-kvaldez
User avatar
hsmith
Agent Smith
Posts: 3539
Joined: Thu Jul 30, 2015 11:09 am
Location: 127.0.0.1
Contact:

Re: WebService Monitoring SOAP Message Monitoring

Post by hsmith »

kvaldez wrote:Hi,

Thanks for your reply.

It actually works!, by changing some parameters I could make the check_http command ping a web service to look for inactivity.

This is the command that I used:

Code: Select all

./check_http -H 192.168.0.99 -p 8283 -k 'SOAPAction:enviarDocumento' -T application/xml -u /services/ESB_LOG -P '<ping>STATUS</ping>
Output:

Code: Select all

HTTP OK: HTTP/1.1 200 OK - 262 bytes in 0.025 second response time |time=0.025234s;;;0.000000 size=262B;;;0
If the service or server is down the output will be this:

Code: Select all

CRITICAL - Socket timeout after 10 seconds
Thanks a lot!

-kvaldez
Awesome! Are we all right to mark this one 'resolved' and lock 'er up?
Former Nagios Employee.
me.
User avatar
kvaldez
Posts: 27
Joined: Tue Aug 18, 2015 4:57 pm
Location: Lima/Peru

Re: WebService Monitoring SOAP Message Monitoring

Post by kvaldez »

Yeah, sure
Locked