[hobbit] Comma-separated lists of hostnames, etc. in hobbit-alerts.cfg is not documented

Shawn Heisey hobbit at elyograg.org
Wed Oct 15 18:37:21 CEST 2008


> I struggled with the same thing through a lot of trial and error.  On 
> a related note, I highly recommend trying to get away from using a 
> comma separated list as it's a nightmare to maintain.  I'm working 
> toward using the PAGE token, where a list of hosts on a given page 
> alerts a group, so you're effectively grouping your hosts based on the 
> support team responsible.  There will still be exceptions, but if you 
> can generalize alerts so all the hosts on a given page can alert the 
> same way, you'll save time and avoid the possibility of a host not 
> having an alert configured.  Just my 2 cents.
<snip>
>
> We definitely need some more complex examples.  Maybe someone who has 
> a complex and varied hobbit-alerts.cfg can post some sanitized 
> examples that someone can commit to SVN?
>
> Many thanks,
>
> SebA
>
>

I use regular expressions and the macro capability to create a situation 
similar to the host groups and page groups from Big Brother, but more 
powerful.  This results in a hobbit-alerts.cfg file that is considerably 
smaller than it might have been, and makes changes easier. At the end of 
this message are some excerpts with the domain name obscured:

I found that I couldn't effectively use the PAGE capability.  I started 
to set it up, but found that I was only putting one or two hosts on many 
of the pages.  This made it very cumbersome to find anything, so 
everything is on one page.  I've set up the webserver so that entering 
"hobbit" into a browser lands you on the non-green list.  Because we've 
got a lot of hosts on that single page and we're nowhere near done 
adding things, I might go back and divide things up into multiple pages, 
but it won't be used for alerting.

Statistics:
 Hosts               :   131
 Status messages     :  1159
 Purple messages     :     0
 Pages               :     1

----------
$HG_BSESSION=%(bs07|bs08|mn01bs1|mn01bs1|dvb[0-9]bs[0-9])
$HG_MFTP=%(ftpman[0-9]*|mediasftp[0-9]*|feedpro[0-9]*)
$PG_MFTP=user1 at mydomain.com,user2 at mydomain.com
$PG_MEDIAS=user3 at mydomain.com
$PG_NOC=operators at mydomain.com,italert at mydomain.com,alarms at mydomain.com
$PG_IT=italert at mydomain.com

#--
HOST=$HG_BSESSION EXSERVICE=msgs
   MAIL $PG_MEDIAS,$PG_NOC REPEAT=30 COLOR=red,purple RECOVERED

HOST=$HG_BSESSION SERVICE=msgs
   MAIL $PG_MEDIAS,$PG_IT REPEAT=30 COLOR=red,purple

#--
HOST=$HG_MFTP EXSERVICE=msgs
   MAIL $PG_MFTP,$PG_NOC REPEAT=30 COLOR=red,purple RECOVERED

HOST=$HG_MFTP SERVICE=msgs
   MAIL $PG_MFTP,$PG_IT REPEAT=30 COLOR=red,purple

#
# Catchall entries using the UNMATCHED mail target
#

HOST=* EXSERVICE=msgs
   MAIL $PG_NOC REPEAT=30 COLOR=red,purple RECOVERED UNMATCHED

HOST=* SERVICE=msgs
   MAIL $PG_IT REPEAT=30 COLOR=red,purple UNMATCHED




More information about the Xymon mailing list