[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Alerts Help
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Alerts Help
- From: Omar Hermannsson <omar (at) basis.is>
- Date: Fri, 01 Aug 2008 21:33:25 +0000
- References: <0K4X00HEHXQUT3 (at) emmsvr02.prod.fedex.com>
- User-agent: Thunderbird 2.0.0.14 (X11/20080505)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
hobbitd_alert --test is for simulating various different conditions. It doesn't reflect the current status of the tests.
You can pass extra parameters to specify the color, duration, group and time.
*** from the manpage ***
- ---------------------------------------------------------------
- --test HOST SERVICE [options]
Shows which alert rules matches the given HOST/SERVICE combination. Useful to debug configuration problems, and see what rules are used for an alert.
The possible options are:
--color=COLORNAME The COLORNAME parameter is the color of the alert: red, yellow or purple.
--duration=SECONDS The SECONDS parameter is the duration of the alert in seconds.
--group=GROUPNAME The GROUPNAME paramater is a groupid string from the hobbit-clients.cfg file.
--time=TIMESTRING The TIMESTRING parameter is the time-of-day for the alert, expressed as an absolute time in the epoch format (seconds since Jan
1 1970). This is easily obtained with the GNU date utility using the "+%s" output format.
- -----------------------------------------------------------------
Also instead of HOST=* you can use PAGE=pagename if you've seperated your hosts into subpages in bbhosts.
PAGE=Production COLOR=red EXSERVICE=%(cpu|memory|msgs) DURATION>6
MAIL root (at) localhost
Cheers,
Omar
On fös 1.ágú 2008 21:16, Tim Grzechowski wrote:
> I added the following to hobbit-alerts.cfg:
>
>
>
> HOST=*
>
> MAIL root (at) localhost COLOR=yellow,purple,red
>
>
>
> But when I run the bbcmd test the last line is what is throwing me off.
>
>
>
> [root (at) tstfabric121 etc]# ../bin/bbcmd hobbitd_alert --test
> tstfabric121.ce.fedex.com conn
>
> 2008-08-01 16:11:12 Using default environment file
> /usr/lib/hobbit/server/etc/hobbitserver.cfg
>
> 00024148 2008-08-01 16:11:12 send_alert
> tstfabric121.ce.fedex.com:conn state Paging
>
> 00024148 2008-08-01 16:11:12 Matching host:service:page
> 'tstfabric121.ce.fedex.com:conn:' against rule line 125
>
> 00024148 2008-08-01 16:11:12 *** Match with 'HOST=*' ***
>
> 00024148 2008-08-01 16:11:12 Matching host:service:page
> 'tstfabric121.ce.fedex.com:conn:' against rule line 126
>
> 00024148 2008-08-01 16:11:12 *** Match with 'MAIL root (at) localhost
> COLOR=yellow,purple,red' ***
>
> *00024148 2008-08-01 16:11:12 Mail alert with command 'mail -s
> "Hobbit [12345] tstfabric121.ce.fedex.com:conn CRITICAL (RED)"
> root (at) localhost'*
> a few
> [root (at) tstfabric121 etc]#
>
>
>
> That line is throwing me off. The fact that it says “CRITCAL (RED)”.
> As that host is all green that line would lead me to believe that the
> test is not working as expected and is going to email a CRITCAL (RED)
> email. Correct?
>
>
>
>
>
> /tg
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIk4ElO5lNk+Yy9cgRAqMdAKDMBsqno6aqHnqI7PviJg5jaX4MwgCaArKy
vAWwZR8S+EgYs5sNC+tuZ/A=
=qKeG
-----END PGP SIGNATURE-----