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

Sean MacGuire sean at maclawran.ca
Tue Apr 14 06:40:21 CEST 2015


Could always do something ugly like httphead://blah.com since we have
to parse http/https/etc...

J.C. Cleaver wrote:
> Thinking about it, this might be something that's not too difficult to add
> into xymonnet either. A HEAD is basically just a GET from the poller's
> perspective, and any evaluation on body contents (or lack thereof) is
> semantically identical to the configuration options available now.
> 
> An open question is what the best way to indicate that this is a
> "HEAD-only" test would be.
> 
> It could be something applied to the entire host line (like browser=),
> made into a separate column (similar to httpstatus= or post=, except
> without the... POST), or another per-URL protocol specifier similar to how
> the TLS/SSL configuration is handled.
> 
> (I could see use cases for all three, although I think the middle option
> might be the most manageable.)
> 
> 
> For now, however, this is something that would need to be handled via an
> external script.
> 
> 
> Regards,
> 
> -jc
> 
> 
> 
> On Mon, April 13, 2015 1:45 pm, Andrew Rakowski wrote:
>> 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
>>>
>>> _______________________________________________
>> Xymon mailing list
>> Xymon at xymon.com
>> http://lists.xymon.com/mailman/listinfo/xymon
>>
> 
> 
> _______________________________________________
> Xymon mailing list
> Xymon at xymon.com
> http://lists.xymon.com/mailman/listinfo/xymon


-- 
Sean MacGuire                                 sean at maclawran.ca

Key West                                        +1 305 390 0888
The best way to predict the future is to invent it. -  Alan Kay



More information about the Xymon mailing list