Page 1 of 1

SOAP Script monitoring

Posted: Tue Jun 25, 2019 1:25 am
by Srinija544
Hi All,

We are using Nagios Core and we have a new request to monitor SOAP Script. Please find the below script:

--soap '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sal="http://www.sonatacentral.com/service/v3 ... leschannel" xmlns:ser="http://www.sonatacentral.com/service/v30/Service" xmlns:cal="http://www.sonatacentral.com/service/v30/CallerDetails" xmlns:iden="http://www.sonatacentral.com/service/v3 ... tifierType" xmlns:dat="http://www.sonatacentral.com/service/v3 ... v:Envelope>'

===============================================

We have placed this script in Nagios server using this command:

check_command check_soap!--action "GetResponse" --url "http://dc1uat163.twruat.ext/sonata/serv ... nelService" --grep '(?<=40000001>)[0-9]+(?=</)' --soap '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sal="http://www.sonatacentral.com/service/v3 ... leschannel" xmlns:ser="http://www.sonatacentral.com/service/v30/Service" xmlns:cal="http://www.sonatacentral.com/service/v30/CallerDetails" xmlns:iden="http://www.sonatacentral.com/service/v3 ... tifierType" xmlns:dat="http://www.sonatacentral.com/service/v3 ... v:Envelope>'

=============================================

However we are getting an error message as below:

SOAP UNKNOWN: Failed to extract value from response

==================================================

Please someone help me on this request.

Regards,
Srinija.

Re: SOAP Script monitoring

Posted: Tue Jun 25, 2019 2:49 pm
by cdienger
I'm not familiar with that plugin. Can you provide a link to download it or attach it to the ticket? Are you able to run it directly from the command line?

Re: SOAP Script monitoring

Posted: Wed Jun 26, 2019 4:40 am
by Srinija544
Hi cdienger,

Thank you for your response.

Please find the attached script of check_soap plugin which we are using for our alert. We are using this script in our Nagios server.

We have command to this in our commands.cfg file:

define command{
command_name check_soap
command_line $USER1$/monitoring-plugins/check_soap.sh $ARG1$
}

Could you please check and help me on this?

Re: SOAP Script monitoring

Posted: Thu Jun 27, 2019 2:45 pm
by cdienger
Run the command like this to get debug output:

Code: Select all

bash -x /usr/local/nagios/libexec/check_soap.sh --action "GetResponse" --url "http://www.gosomethingsomething.com" --grep '(?<=40000001>)[0-9]+(?=</)' --soap '<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sal="http://www.sonatacentral.com/service/v30/common/saleschannel" xmlns:ser="http://www.sonatacentral.com/service/v30/Service" xmlns:cal="http://www.sonatacentral.com/service/v30/CallerDetails" xmlns:iden="http://www.sonatacentral.com/service/v30/globaltypes/IdentifierType" xmlns:dat="http://www.sonatacentral.com/service/v30/globaltypes/common/data/DataGroupType"><soapenv:Header/><soapenv:Body><sal:getLocationRequest><ser:CallerDetails><cal:username>demo</cal:username><cal:country>AU</cal:country><cal:language>en</cal:language><cal:databaseIdentifier>SONUAT</cal:databaseIdentifier></ser:CallerDetails><sal:LocationIdentifier><iden:id>40000001</iden:id></sal:LocationIdentifier></sal:getLocationRequest></soapenv:Body></soapenv:Envelope>'