On Wed, 2 Mar 2011 16:51:47 -0500, Elizabeth Schwartz <betsy.schwartz at gmail.com> wrote:
Pile of beginner questions here:
- if I have two http tests for one server, as in 10.0.1.2 myserver.example.com # http://myserver.example.com/link1 http://myserver.example.com/link2 do I need to put a separate badhttp after each test or can I just put one at the end?
One at the end.
- If a network test fails it is repeated at short intervals, IIRC it's every minute. If I set badhttp:1:2:4 , is it counting four 1-minute intervals or four 5-minute xymon test intervals?
4 5-minute intervals. The repeat-tests don't count in the badhttp numbers.
- Is there a way to set a default for all http tests and just override for a few servers? We'll want almost all our servers to wait a few minutes before alerting
Put the "badhttp" setting on a ".default." host before the definition of all the hosts that have http checks. I usually recommend doing it this way (goes for everything you put on .default.):
0.0.0.0 .default. # badhttp:1:2.4 10.0.0.1 web1.example.com # http://web1/ 10.0.0.2 web2.example.com # http://web2/ https://public.example.com/ 0.0.0.0 .default.
That last line clears the default settings, so they dont end up being used for hosts that you don't want them to be on. This is especially tricky if you use multiple include's in your bb-hosts file.
and 4) do I need a trailing / on the url?
Depends on the webserver config. Often, a URL without the trailing slash will make the webserver respond with a redirect (302 status) instead of the actual page, which could mean that any content- generating backend (app. server, database, whatever) will not be checked unless you do add the trailing slash.
The "curl" utility can be quite useful to see what response your webserver actually generates for the various URL's. Use "curl -i" to see the HTTP headers sent back in the response.
Regards, Henrik