Soap webservice response time

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
gurkakrieg
Posts: 15
Joined: Mon Sep 09, 2013 5:43 pm

Soap webservice response time

Post by gurkakrieg »

Maybe I'm missing something simple, but how would I check the response time from a webservice that uses soap? I've got the webinject plugin running and am getting back results from my post invocation, but I can't figure out how to measure the response time. If I call the test with a report type of "standard", the cmdline gives me perfdata that shows the response time.

Do I need to write a custom command to parse out that data from the returned string?

I feel like I'm missing something obvious here.

Mike
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Soap webservice response time

Post by slansing »

Can you share your check command with us as well as what you are inputting as arguments?
gurkakrieg
Posts: 15
Joined: Mon Sep 09, 2013 5:43 pm

Re: Soap webservice response time

Post by gurkakrieg »

Sure,

Check command:

Code: Select all

define command{
    command_name            check-soap-response
    command_line            $USER1$/check_webinject -c /usr/lib64/nagios/plugins/config.xml -o /etc/nagios/output/
}
config.xml:

Code: Select all

<report_type>standard</report_type>
    <testcasefile>/usr/lib64/nagios/plugins/test1.xml</testcasefile>
<globalhttplog>onfail</globalhttplog>
I'm using check_webinject v. 1.74 on CentOS.

What I ended up doing was creating a new bash-based plugin named "check_responsetime.sh". Inside of it, I call the command_line from above, capture its output, then regex out the response time that I need to test against. The remainder of the shell script just checks for command-line options and outputs a Nagios-compliant output string and exit code based on the values I pass in. It's working pretty well.

I just wasn't sure if this was the right approach or a needless kludge.

Mike
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Soap webservice response time

Post by slansing »

That sounds similar to the path I would have taken. I don't think there are any solutions for this beyond what you have already done. If you can figure out a way to wrap that all together into one plugin I'm sure it would be a worth while submission to the exchange!
Locked