[Xymon] Any way to do http tests with HEAD request?

Andrew Rakowski landrew at pnnl.gov
Mon Apr 13 22:45:39 CEST 2015


Thanks for the reply Jeremy.  I thought about making a "httphead" test in 
the protocols.cfg file, and using the "curl" utility to do what BigBrother 
used to do, but I don't see how to pass the URL to the test.

Is there some implicit passing of test URL to these protocols.cfg defined 
tests (like the string from the hosts.cfg file is stuck at the end of the 
invoked command taken from protocols.cfg?)  I don't see any examples in 
the file, and it looks like everything just sends canned strings.

In this case, I'd want to run the "curl" command like this:

     /usr/bin/curl -g -s -S -m 45 -I -k --connect-timeout 15

with the URL taken from the hosts.cfg line, which looks like this:

     0.0.0.0         xyz-web2 # noconn --timeout=15 https://xyz.somewhere.com/xyz/portal/user/anon/js_peid/123456789/panel/Main/template/content

so that webpage could be tested by the curl utility, which is configured 
to send only a "HEAD" request to the web server (the '-I' option.)  That 
curl command is what was being used in BigBrother.

Cheers,

-Andrew


On Thu, 9 Apr 2015, Jeremy Laidman wrote:

> On 10 April 2015 at 11:19, Andrew Rakowski <landrew at pnnl.gov> wrote:
>       I didn't understand why nobody was complaining previously, until I saw that BigBro
>       was set up to use the "curl" command with the "-I" option (aka the "--head" option)
>       to send a "HEAD" request to the server.  The BigBro web test used this setting:
> 
> 
> This was one of the problems with BigBro - it forked to external programs to do the probes which
> doesn't scale, whereas xymonnet does it all internally.
> 
> Alas, xymonnet sends either a POST or a GET request, and this cannot be modified by
> configuration.
> 
> I can see two options for you.  One is to do your own curl/wget call with a HEAD request, in a
> script.  The other option is to define your own "http" protocol definition in protocols.cfg and
> use that.  You would probably need to name it something other than "http" otherwise xymonnet
> will use its internal protocol code rather than what's defined in protocols.cfg.
> 
> J
> 
>


More information about the Xymon mailing list