[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] More alert testing
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] More alert testing
- From: henrik (at) hswn.dk (Henrik Stoerner)
- Date: Tue, 31 May 2005 22:04:54 +0200
- References: <429CB590.4090206@wi.rr.com>
- User-agent: Mutt/1.5.6+20040907i
On Tue, May 31, 2005 at 02:05:52PM -0500, Rich Smrcina wrote:
> I have email macros configured thusly:
>
> $pg-rich=%rsmrcina (at) wi.rr.com
> $pg-tom=%(2628531588 (at) vtext.com|tbrockman (at) ourdomain.com)
This is wrong. You're trying to use regular expressions for mail
addresses - that has never been possible. Reg. expressions are for
matching hostnames, testnames and such - not for mail adresses.
$pg-rich=rsmrcina (at) wi.rr.com
$pg-tom=2628531588 (at) vtext.com tbrockman (at) ourdomain.com
will do what you want.
> HOST=%(vse*|vm*) DURATION>5m
> MAIL $pg-tom
> MAIL $pg-rich
>
> So if any test on a host beginning with vse or vm fails, both Tom and
> Rich will get a page after 5 minutes.
>
> When I test the process, I get the following:
>
> hobbit (at) hobbit1:~/server/bin> ./bbcmd hobbitd_alert --test vm2 conn
> 2005-05-31 14:00:10 Using default environment file
> /home/hobbit/server/etc/hobbitserver.cfg
> 00002400 2005-05-31 14:00:10 send_alert vm2:conn state Paging
> 00002400 2005-05-31 14:00:10 Matching host:service:page 'vm2:conn:'
> against rule line 145
> 00002400 2005-05-31 14:00:10 Failed 'HOST=%(vse*|vm*) DURATION>5m' (min.
> duration 0<300)
You need to pass a duration value to the --test option, otherwise it
runs the test matching assuming the alert has just triggered (so the
duration is 0 seconds, which is less than your setting of 5 minutes).
Try
./bbcmd hobbitd_alert --test vm2 conn 500
(the "500" is seconds).
Henrik