[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] Comma-separated lists of hostnames, etc. in hobbit-alerts.cfg is not documented
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] Comma-separated lists of hostnames, etc. in hobbit-alerts.cfg is not documented
- From: "jm54601 (at) yahoo.com" <jm54601 (at) yahoo.com>
- Date: Wed, 15 Oct 2008 08:03:01 -0700 (PDT)
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:MIME-Version:Content-Type:Message-ID; b=TCKmp9AvTx5tmpFJqaHiSJiSwJR1O5VUSoa2yYfLEgg1WcUs0KjXMMG1ebQA0N0+7d3GHmwNkl+gVivNizj5DThkrCk/9E2NZn1UY+PMXHCp/Reyfcct0FA9hwrKc57Nu76HdaieC6mfIHukdXGCl/XMicf0P0t2xLMocSM9CSY=;
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.
----- Original Message ----
From: SebA <spa (at) syntec.co.uk>
To: hobbit (at) hswn.dk
Sent: Wednesday, October 15, 2008 7:43:35 AM
Subject: [hobbit] Comma-separated lists of hostnames, etc. in hobbit-alerts.cfg is not documented
Comma-separated lists of hostnames in hobbit-alerts.cfg is not documented, so maybe we could add something like this (taken from http://hobbitmon.sourceforge.net/docs/man5/hobbit-clients.cfg.5.html) to http://hobbitmon.sourceforge.net/docs/man5/hobbit-alerts.cfg.5.html:
HOST=targetstring Rule matching a host by the hostname. "targetstring"
is either a comma-separated list of hostnames (from the bb-hosts file),
"*" to indicate "all hosts", or a Perl-compatible regular expression.
E.g. "HOST=dns.foo.com,www.foo.com" identifies two specific hosts;
"HOST=%www.*.foo.com EXHOST=www-test.foo.com" matches all hosts with a
name beginning with "www", except the "www-test" host.
Adding an example that used the comma-separated syntax to http://hobbitmon.sourceforge.net/docs/hobbit-alerts.htmland hobbit-alerts.cfg (sample) files would also be good.
And, actually, maybe something to say that the comma-separated syntax can be used in all XXX= places (except, presumably, REPEAT) and also for the recipient. One really shouldn't have to work this basic stuff out using:
$ ./bin/bbcmd hobbitd_alert --test
!
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