Xymon Mailing List Archive search

Newbie badhttp questions

6 messages in this thread

list Elizabeth Schwartz · Wed, 2 Mar 2011 16:51:47 -0500 ·
Pile of  beginner questions here:

1) 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?

2) 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?

3) 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

and 4) do I need a trailing / on the url?

thanks much
Betsy
list Josh Luthman · Wed, 2 Mar 2011 17:05:05 -0500 ·
1) Guessing it would be one per host based on my reading

2) badhttp:1:2:4

defines a http test that goes "clear" after the first failure,
"yellow" after two successive failures, and "red" after four
successive failures.

3) Yes.  Set the test you want to only respond on red condition after say 10
minutes of being down.

HOST=%.*\.imaginenetworksllc\.com
  MAIL user-4c45a83f15cb@xymon.invalid COLOR=RED DURATION>10m REPEAT=60
RECOVERED

4) Depends on your web server.  If it does a correct http 303 and your test
considers that green, you're good.  I know the APC 9616 to 9619 cards did
NOT answer an acceptable answer (according to Xymon) without the
/something.ext

Josh Luthman
Office: XXX-XXX-XXXX
Direct: XXX-XXX-XXXX
XXXX Wayne St
Suite XXXX
Troy, OH XXXXX


On Wed, Mar 2, 2011 at 4:51 PM, Elizabeth Schwartz <user-c61747246f66@xymon.invalid
quoted from Elizabeth Schwartz
wrote:
Pile of  beginner questions here:

1) 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?

2) 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?

3) 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

and 4) do I need a trailing / on the url?

thanks much
Betsy

list Henrik Størner · Thu, 03 Mar 2011 10:49:43 +0100 ·
On Wed, 2 Mar 2011 16:51:47 -0500, Elizabeth Schwartz
quoted from Josh Luthman
<user-c61747246f66@xymon.invalid> wrote:
Pile of  beginner questions here:

1) 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.
2) 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.
quoted from Josh Luthman
3) 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
list Elizabeth Schwartz · Mon, 14 Mar 2011 12:24:36 -0400 ·
Belated thanks on the badhttp! My test didn't do what I thought it
would do. We have some servers which we want to go red after 10
minutes. Don't really care when or if they go yellow or clear, . The
below is what I had, and it paged immediately on red. Can I have a
blank between fields? If not, can two fields be the same, should it be
badsmtp:1:1:2 ?
thanks Betsy


0.0.0.0   .default.   # DOWNTIME=0:0000:0300 badsmtp:1::2

10.101.251.100    server1.example.com #
10.101.184.224    server2.bo3.example.com # smtp smtp_8025:8025
10.101.251.101    server3.bo3.example.com # smtp
10.101.251.102    server4.bo3.example.com # smtp
<snipping more servers>
10.101.184.160    server30.example.com # smtp
### set default back
0.0.0.0 .default.
list Henrik Størner · Mon, 14 Mar 2011 17:36:34 +0100 ·
Hi,
quoted from Elizabeth Schwartz
Belated thanks on the badhttp! My test didn't do what I thought it
would do. We have some servers which we want to go red after 10
minutes. Don't really care when or if they go yellow or clear, . The
below is what I had, and it paged immediately on red. Can I have a
blank between fields? If not, can two fields be the same, should it be
badsmtp:1:1:2 ?
badsmtp:1:1:2 is the right way to do it.


Regards,
Henrik
list Elizabeth Schwartz · Mon, 14 Mar 2011 12:43:23 -0400 ·
Great thanks!

I note that this one DOES work:
################# set a new default
0.0.0.0   .default.   # DOWNTIME=0:0000:0300 badhttp:::2

(just got notified while I was writing the earlier email)
quoted from Henrik Størner

On Mon, Mar 14, 2011 at 12:36 PM, Henrik Størner <user-ce4a2c883f75@xymon.invalid> wrote:
Hi,
Belated thanks on the badhttp! My test didn't do what I thought it
would do. We have some servers which we want to go red after 10
minutes. Don't really care when or if they go yellow or clear, . The
below is what I had, and it paged immediately on red. Can I have a
blank between fields? If not, can two fields be the same, should it be
badsmtp:1:1:2 ?
badsmtp:1:1:2 is the right way to do it.


Regards,
Henrik