SOAP Script monitoring

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Srinija544
Posts: 58
Joined: Mon Oct 15, 2018 9:30 pm

SOAP Script monitoring

Post 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.
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: SOAP Script monitoring

Post 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?
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Srinija544
Posts: 58
Joined: Mon Oct 15, 2018 9:30 pm

Re: SOAP Script monitoring

Post 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?
Attachments
check_soap.txt
(3.65 KiB) Downloaded 250 times
User avatar
cdienger
Support Tech
Posts: 5045
Joined: Tue Feb 07, 2017 11:26 am

Re: SOAP Script monitoring

Post 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>'
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked