Page 1 of 1
Soap webservice response time
Posted: Mon Sep 09, 2013 5:48 pm
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
Re: Soap webservice response time
Posted: Tue Sep 10, 2013 10:54 am
by slansing
Can you share your check command with us as well as what you are inputting as arguments?
Re: Soap webservice response time
Posted: Tue Sep 10, 2013 4:28 pm
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
Re: Soap webservice response time
Posted: Tue Sep 10, 2013 4:59 pm
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!