Xymon Mailing List Archive search

http test question

6 messages in this thread

list Taylor Lewick · Mon, 31 Oct 2011 15:40:02 -0500 ·
Hi all.  Is it possible to control the times an HTTP URL test is performed?

I know I can add http://www.sample.com and use regexs to look for an occurrence of the word Fail, but we would only like it to check once or twice per day, say at 7:45 and then once more at 8:25.  I know its easy to control the timing of when the alert is sent.  But can I limit when the test is run?  Short of creating an ext-script, not sure how I do that in xymon.

Thanks,
Taylor
list Ford Alan · Mon, 31 Oct 2011 23:11:58 +0000 ·
Hi, you can try using use the NKTIME tag in hosts.cfg to control this.
Note these options will be dropped in Xymon 5.

Alan
quoted from Taylor Lewick


From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Taylor Lewick
Sent: Tuesday, 1 November 2011 6:40 AM
To: xymon at xymon.com
Subject: [Xymon] http test question

Hi all.  Is it possible to control the times an HTTP URL test is performed?

I know I can add http://www.sample.com and use regexs to look for an occurrence of the word Fail, but we would only like it to check once or twice per day, say at 7:45 and then once more at 8:25.  I know its easy to control the timing of when the alert is sent.  But can I limit when the test is run?  Short of creating an ext-script, not sure how I do that in xymon.

Thanks,
Taylor


This email is to be read subject to the email disclaimer located at http://www.stanwell.com/email-disclaimer.aspx
list Taylor Lewick · Tue, 1 Nov 2011 07:45:37 -0500 ·
According to the docs, the NKTIME controls when the alert is displayed on the webpage, but I don't think it keeps the test from running.  I'd like to be able to tell the test to run only once or twice.  I'm guessing I'll need to just write a custom script and control it via cron or the ext and xymon framework...
quoted from Ford Alan

From: FORD Alan [mailto:user-eb925835b8b9@xymon.invalid]
Sent: Monday, October 31, 2011 6:12 PM
To: Taylor Lewick; xymon at xymon.com
Subject: RE: http test question

Hi, you can try using use the NKTIME tag in hosts.cfg to control this.
Note these options will be dropped in Xymon 5.

Alan


From: xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] On Behalf Of Taylor Lewick
Sent: Tuesday, 1 November 2011 6:40 AM
To: xymon at xymon.com
Subject: [Xymon] http test question

Hi all.  Is it possible to control the times an HTTP URL test is performed?

I know I can add http://www.sample.com and use regexs to look for an occurrence of the word Fail, but we would only like it to check once or twice per day, say at 7:45 and then once more at 8:25.  I know its easy to control the timing of when the alert is sent.  But can I limit when the test is run?  Short of creating an ext-script, not sure how I do that in xymon.

Thanks,
Taylor


This email is to be read subject to the email disclaimer located at http://www.stanwell.com/email-disclaimer.aspx
list Steve Holmes · Tue, 1 Nov 2011 10:36:43 -0400 ·
You will also have to deal with the purple that will result if you don't
keep reporting the test to the server.
Steve

On Tue, Nov 1, 2011 at 8:45 AM, Taylor Lewick
quoted from Taylor Lewick
<user-ccbabb0b3ab0@xymon.invalid>wrote:
According to the docs, the NKTIME controls when the alert is displayed on
the webpage, but I don’t think it keeps the test from running.  I’d like to
be able to tell the test to run only once or twice.  I’m guessing I’ll need
to just write a custom script and control it via cron or the ext and xymon
framework…****

** **

*From:* FORD Alan [mailto:user-eb925835b8b9@xymon.invalid]
*Sent:* Monday, October 31, 2011 6:12 PM
*To:* Taylor Lewick; xymon at xymon.com
*Subject:* RE: http test question****

** **

Hi, you can try using use the NKTIME tag in hosts.cfg to control this.****

Note these options will be dropped in Xymon 5.****

** **

Alan****

** **

** **

*From:* xymon-bounces at xymon.com [mailto:xymon-bounces at xymon.com] *On
Behalf Of *Taylor Lewick
*Sent:* Tuesday, 1 November 2011 6:40 AM
*To:* xymon at xymon.com
*Subject:* [Xymon] http test question****

** **

Hi all.  Is it possible to control the times an HTTP URL test is performed?
****

** **

I know I can add http://www.sample.com and use regexs to look for an
occurrence of the word Fail, but we would only like it to check once or
twice per day, say at 7:45 and then once more at 8:25.  I know its easy to
control the timing of when the alert is sent.  But can I limit when the
test is run?  Short of creating an ext-script, not sure how I do that in
xymon.****

** **

Thanks,****

Taylor****

** **

** **

This email is to be read subject to the email disclaimer located at
http://www.stanwell.com/email-disclaimer.aspx****

-- 

If they give you ruled paper, write the other way. -Juan Ramon Jimenez,
poet, Nobel Prize in literature (1881-1958)

Truth never damages a cause that is just. -Mohandas Karamchand Gandhi
(1869-1948)
list Ryan Novosielski · Tue, 01 Nov 2011 11:08:26 -0400 ·
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

There is an option for setting the data lifetime -- that does not have
to happen (though it is one fixed value).
quoted from Steve Holmes

On 11/01/2011 10:36 AM, Steve Holmes wrote:
You will also have to deal with the purple that will result if you don't
keep reporting the test to the server.
Steve

On Tue, Nov 1, 2011 at 8:45 AM, Taylor Lewick
<user-ccbabb0b3ab0@xymon.invalid <mailto:user-ccbabb0b3ab0@xymon.invalid>> wrote:

    According to the docs, the NKTIME controls when the alert is
    displayed on the webpage, but I don’t think it keeps the test from
    running.  I’d like to be able to tell the test to run only once or
    twice.  I’m guessing I’ll need to just write a custom script and
    control it via cron or the ext and xymon framework…____

    __ __

    *From:*FORD Alan [mailto:user-eb925835b8b9@xymon.invalid
    <mailto:user-eb925835b8b9@xymon.invalid>]
    *Sent:* Monday, October 31, 2011 6:12 PM
    *To:* Taylor Lewick; xymon at xymon.com <mailto:xymon at xymon.com>
quoted from Steve Holmes
    *Subject:* RE: http test question____

    __ __

    Hi, you can try using use the NKTIME tag in hosts.cfg to control
    this.____

    Note these options will be dropped in Xymon 5.____

    __ __

    Alan____

    __ __

    __ __

    *From:*xymon-bounces at xymon.com <mailto:xymon-bounces at xymon.com>
    [mailto:xymon-bounces at xymon.com <mailto:xymon-bounces at xymon.com>]
quoted from Steve Holmes
    *On Behalf Of *Taylor Lewick
    *Sent:* Tuesday, 1 November 2011 6:40 AM

    *To:* xymon at xymon.com <mailto:xymon at xymon.com>
quoted from Steve Holmes
    *Subject:* [Xymon] http test question____

    __ __

    Hi all.  Is it possible to control the times an HTTP URL test is
    performed?____

    __ __

    I know I can add http://www.sample.com and use regexs to look for an
    occurrence of the word Fail, but we would only like it to check once
    or twice per day, say at 7:45 and then once more at 8:25.  I know
    its easy to control the timing of when the alert is sent.  But can I
    limit when the test is run?  Short of creating an ext-script, not
    sure how I do that in xymon.____

    __ __

    Thanks,____

    Taylor____

    __ __

    __ __

    This email is to be read subject to the email disclaimer located at
    http://www.stanwell.com/email-disclaimer.aspx____


-- 
If they give you ruled paper, write the other way. -Juan Ramon Jimenez,
poet, Nobel Prize in literature (1881-1958) 
Truth never damages a cause that is just. -Mohandas Karamchand Gandhi
(1869-1948)

- -- - ---- _  _ _  _ ___  _  _  _

|Y#| |  | |\/| |  \ |\ |  | |Ryan Novosielski - Sr. Systems Programmer
|$&| |__| |  | |__/ | \| _| |user-ae4522577e16@xymon.invalid - 973/972.0922 (2-0922)
\__/ Univ. of Med. and Dent.|IST/CST-Academic Svcs. - ADMC 450, Newark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk6wC2oACgkQmb+gadEcsb4oKQCgneFRHDSTbrF3yMzwSx3ED3gS
T/QAoIDZaQ4JNxBa12aur2cI7tsYWW5C
=cwI4
-----END PGP SIGNATURE-----
list Henrik Størner · Thu, 10 Nov 2011 12:21:26 +0100 ·
On Mon, 31 Oct 2011 15:40:02 -0500, Taylor Lewick
quoted from Ryan Novosielski
<user-ccbabb0b3ab0@xymon.invalid> wrote:
Hi all.  Is it possible to control the times an HTTP URL test is
performed?

I know I can add http://www.sample.com and use regexs to look for an
occurrence of the word Fail, but we would only like it to check once or
twice per day, say at 7:45 and then once more at 8:25.  I know its easy
to
control the timing of when the alert is sent.  But can I limit when the
test is run?  Short of creating an ext-script, not sure how I do that in
xymon.
There is, but it is a bit of work.

1) Change the XYMONNETWORK setting in xymonserver.cfg to "standard".
2) Either add the "--test-untagged" option to your xymonnet command in
tasks.cfg, or add "NET:standard" to all of your normal hosts.
3) Add a "NET:morningcheck" to the host(s) that have this particular
schedule.

You now have a setup where the normal network checks will test all
servers, except the ones with the special schedule.

So, to run the morning check on the special hosts, create an extension
script with this:

#!/bin/sh
XYMONNETWORK=morningcheck
export XYMONNETWORK
exec xymonnet $*

Put this in ~xymon/server/ext/morningcheck and make that file executable.

Then configure tasks.cfg to run this at the specific times you want. In
tasks.cfg, add this:

[morningcheck0745]
   CMD $XYMONHOME/ext/morningcheck --validity=60  [... any other xymonnet
options ...]
   CRONDATE 45 7 * * *
[morningcheck0815]
   CMD $XYMONHOME/ext/morningcheck --validity=1440 [... any other xymonnet
options ...]
   CRONDATA 15 8 * * *

The --validity options are to make sure the checks don't go purple, since
you won't be updating the status every 5 minutes.


The same technique can be used if you want to run checks with different
intervals, e.g. if you have hosts that must be checked more often than once
every 5 minutes.


Regards,
Henrik