[smokeping-users] curl probe and xml response

Guarini, Jeremy Jeremy.Guarini at nuance.com
Sat Jan 8 00:53:33 CET 2011


Hi all,

I am using the curl probe successfully with two sites but a third site that I have configured doesn't seem to work. I have ran smokeping in debug and have then taken the failing check and ran that by hand on the command line, which worked just fine. Comparing the output from the successful checks against the one that fails the only difference I can spot is in the response from the server, here is the difference:

*working*
< HTTP/1.1 200 OK
< Date: Fri, 07 Jan 2011 23:42:10 GMT
< Content-Length: 2595
< Content-Type: text/xml; charset=utf-8
< Set-Cookie: JSESSIONID=T79QNnkSqfhRrpGMPwmQhsPtyS3m0sQrmn2JnL0XshqQjKpnp4Z7!-1675284917; path=/
<


*fails*
< HTTP/1.1 200 OK
< Server: Apache-Coyote/1.1
< Content-Type: text/xml
< Content-Length: 4633
< Date: Fri, 07 Jan 2011 23:42:47 GMT
<


Trying to get more output from smokeping I went and changed the lib/Smokeping/probes/Curl.pm so that it would do system/exec on the @cmd and output stdout and stderr to a file to verify that I was actually getting a response from the server. Checking the stderr file I saw the expected correct output from the server, which happened to be the same output when calling curl directly.

Here's a snip of the debug output from smokeping

Smokeping version 2.004002 successfully launched.
Not entering multiprocess mode with '--debug'. Use '--debug-daemon' for that.
Curl: probing 1 targets with step 300 s and offset 149 s.
FPing: probing 0 targets with step 300 s and offset 149 s.
TCPPing: probing 0 targets with step 300 s and offset 149 s.
DNS: probing 0 targets with step 300 s and offset 149 s.
Curl: forks 5, timeout for each target 101
Curl: executing command list '/usr/local/bin/curl','-m','10','-o','-','-w','Time: %{time_total} DNS time: %{time_namelookup} Redirect time: %{time_redirect}\n','-L','--fail','--data','/admin/smokeping/xml-test/data.xml','--header','"SOAPAction: /test/info/query"','--header','"Content-Type: text/xml"','http://127.0.0.1:80/test/test'
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0    33    0     0    0    33      0      3 --:--:--  0:00:10 --:--:--     0
curl: (28) Operation timed out after 10000 milliseconds with 0 bytes received
Curl: curl output: 'Time: 10.037 DNS time: 0.002 Redirect time: 0.000', result: 10.035
Curl: WARNING: curl exited with status 28 on 127.0.0.1

And here's the conf section for the site

++  xml_test
probe = Curl
menu = xml test curl
title = xml test curl
host = 127.0.0.1
insecure_ssl = 0
ssl2 = 0
pings = 5
timeout = 10
extraargs =  --fail;--data;/admin/smokeping/xml-test/data.xml;--header;"SOAPAction: /test/info/query";--header;"Content-Type: text/xml"
extrare = /;/
urlformat = http://%host%:80/test/test
alerts = total_loss


Relavent OS info:
-bash-3.00$ ./bin/smokeping --version
2.004002

-bash-3.00$ /usr/local/bin/curl --version
curl 7.19.6 (sparc-sun-solaris2.10) libcurl/7.19.6 OpenSSL/0.9.8l zlib/1.2.3 libidn/1.14 libssh2/1.2.2
Protocols: tftp ftp telnet dict http file https ftps scp sftp
Features: IDN IPv6 Largefile NTLM SSL libz

-bash-3.00$ uname -a
SunOS snmblv04 5.10 Generic_142900-12 sun4v sparc SUNW,SPARC-Enterprise-T5220

I'm at a loss as to why the response seems to come back but smokeping just times out on the check, and as I noted two other checks work just fine.

Also, is there a way to get all the traffic printed out and every step that is occurring, ie. More output other than —debug ?

thanks
--
Jeremy Guarini



More information about the smokeping-users mailing list