Host Groups in hobbit-alerts.cfg as per BB?
list Andy France
Is it possible to create "host groups" for alerting as per the
bbwarnsetup.cfg and bbwarnrules.cfg files in Big Brother?
The hobbit-alerts.cfg file mentions I can use regular expression type
wildcards, but some servers for which I want the same alerting do not
follow any such pattern. Does using "%hostA1|hostA2|hostB3|otherhost" fake
the grouping?
TIA,
Andy.
#####################################################################################
This email is intended for the person to whom it is addressed
only. If you are not the intended recipient, do not read, copy
or use the contents in any way. The opinions expressed may not
necessarily reflect those of ZESPRI Group of Companies ('ZESPRI').
While every effort has been made to verify the information
contained herein, ZESPRI does not make any representations
as to the accuracy of the information or to the performance
of any data, information or the products mentioned herein.
ZESPRI will not accept liability for any losses, damage or
consequence, however, resulting directly or indirectly from
the use of this e-mail/attachments.
#####################################################################################
list Henrik Størner
▸
On Tue, Jan 18, 2005 at 02:03:40PM +1300, Andy France wrote:
Is it possible to create "host groups" for alerting as per the bbwarnsetup.cfg and bbwarnrules.cfg files in Big Brother?
Yes. There are actually two way you can do that - the documented one, and the simple one :-)
▸
The hobbit-alerts.cfg file mentions I can use regular expression type wildcards, but some servers for which I want the same alerting do not follow any such pattern. Does using "%hostA1|hostA2|hostB3|otherhost" fake the grouping?
That's the documented way of doing it, yes. Although your example is not quite correct - it should be "%(hostA1|hostA2|hostB3|otherhost)". The simple way is this: "hostA1,hostA2,hostB3,otherhost" Note: You cannot mix the two - it's either a regular expression, or a simple list. Regards, Henrik
list Rick Waegner
Is it also possible to have page groups setup the same way? as in: HOST=* SERVICE=conn REPEAT=10 RECOVERED MAIL= "user-bb555dc64cde@xymon.invalid,user-f5cd6d1f5b53@xymon.invalid,user-53ac79997b90@xymon.invalid" DURATION>30 COLOR=red Rick
▸
On Tue, 2005-01-18 at 00:29, Henrik Stoerner wrote:On Tue, Jan 18, 2005 at 02:03:40PM +1300, Andy France wrote:Is it possible to create "host groups" for alerting as per the bbwarnsetup.cfg and bbwarnrules.cfg files in Big Brother?Yes. There are actually two way you can do that - the documented one, and the simple one :-)The hobbit-alerts.cfg file mentions I can use regular expression type wildcards, but some servers for which I want the same alerting do not follow any such pattern. Does using "%hostA1|hostA2|hostB3|otherhost" fake the grouping?That's the documented way of doing it, yes. Although your example is not quite correct - it should be "%(hostA1|hostA2|hostB3|otherhost)". The simple way is this: "hostA1,hostA2,hostB3,otherhost" Note: You cannot mix the two - it's either a regular expression, or a simple list. Regards, Henrik
list Henrik Størner
▸
On Tue, Jan 18, 2005 at 09:21:13AM -0600, rwaegner wrote:
Is it also possible to have page groups setup the same way?
HOST=* SERVICE=conn REPEAT=10 RECOVERED
MAIL="user-bb555dc64cde@xymon.invalid,user-f5cd6d1f5b53@xymon.invalid,user-53ac79997b90@xymon.invalid" DURATION>30 COLOR=redYes. The parameter after the MAIL keyword is passed directly to the "mail" command, so assuming your "mail" utility supports it, then a comma-separated list of recipients should work. I think all Unix "mail" implementations allow that. Henrik
list Bruce Lysik
▸
That's the documented way of doing it, yes. Although your example is not quite correct - it should be "%(hostA1|hostA2|hostB3|otherhost)". The simple way is this: "hostA1,hostA2,hostB3,otherhost" Note: You cannot mix the two - it's either a regular expression, or a simple list.
I'm trying to migrate from a large BB installation which made extensive use of host groups via the BBConfigure script. While some of the groups would allow for a regex to describe its members, there are quite a few sizable groups where this isn't feasible. Is there any way hobbit could support the bbwarnsetup.cfg file style of host groups? Or possibly the HOST (and MAIL arguments for that matter) could accept shell commands somehow? For example: HOST=`/usr/local/bin/bbgroup netapps` MAIL `cat oncall.txt` (And bbgroup would assemple a comma seperated list of netapp hosts.) Though I suppose the SCRIPT keyword would allow something similar for mailing. Thoughts? -- Bruce Z. Lysik <user-4e63a10f8934@xymon.invalid> Operations Engineer
list Henrik Størner
▸
On Wed, Jan 26, 2005 at 03:28:40PM -0800, Bruce Lysik wrote:
I'm trying to migrate from a large BB installation which made extensive use of host groups via the BBConfigure script. While some of the groups would allow for a regex to describe its members, there are quite a few sizable groups where this isn't feasible.
I doubt that. PCRE's are extremely flexible, see below.
▸
Is there any way hobbit could support the bbwarnsetup.cfg file style of host groups?
No. Frankly, I think this would be unnecessary bloat, because it is fairly easy to do a script that converts the bbwarnsetup hostgroup definitions into Hobbit macros that can be used directly in the alert definitions. I've attached such a script - it appears to work on the bbwarnsetup.cfg I have, but there might be some special cases with bbwarnsetup features I dont use. E.g. if you have a definition like this one hg-asd: mwsicha* asp* mwscsg* slsportal* asdad* asdnam* asdmgmt* the script outputs a macro definition: $HG-ASD=mwsicha(.*)|asp(.*)|mwscsg(.*)|slsportal(.*)|asdad(.*)|asdnam(.*)|asdmgmt(.*) Put this in your hobbit-alerts.cfg, and you can define rules like this: HOST=%$HG-ASD MAIL user-ef86c43926b6@xymon.invalid SERVICE=http etc. (I admit - it's untested, but it should definitely work. The expression at least is correct, and matches the hostnames it is supposed to match). Henrik
Attachments (1)
list Asif Iqbal
▸
On Thu, Jan 27, 2005 at 03:19:56PM, Henrik Stoerner wrote:
On Wed, Jan 26, 2005 at 03:28:40PM -0800, Bruce Lysik wrote: [...]Is there any way hobbit could support the bbwarnsetup.cfg file style of host groups?[...] I've attached such a script - it appears to work on the bbwarnsetup.cfg I have, but there might be some special cases with bbwarnsetup features I dont use. E.g. if you have a definition like this one hg-asd: mwsicha* asp* mwscsg* slsportal* asdad* asdnam* asdmgmt* the script outputs a macro definition: $HG-ASD=mwsicha(.*)|asp(.*)|mwscsg(.*)|slsportal(.*)|asdad(.*)|asdnam(.*)|asdmgmt(.*) Put this in your hobbit-alerts.cfg, and you can define rules like this:
You mean put the above macro definition in the hobbit-alerts.cfg file?
▸
HOST=%$HG-ASD MAIL user-ef86c43926b6@xymon.invalid SERVICE=http etc. (I admit - it's untested, but it should definitely work. The expression at least is correct, and matches the hostnames it is supposed to match). Henrik
--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
"...it said: Install Windows XP or better...so I installed Solaris..."
list Asif Iqbal
▸
On Sat, Feb 12, 2005 at 01:05:13AM, Asif Iqbal wrote:
On Thu, Jan 27, 2005 at 03:19:56PM, Henrik Stoerner wrote:On Wed, Jan 26, 2005 at 03:28:40PM -0800, Bruce Lysik wrote: [...]Is there any way hobbit could support the bbwarnsetup.cfg file style of host groups?[...] I've attached such a script - it appears to work on the bbwarnsetup.cfg I have, but there might be some special cases with bbwarnsetup features I dont use.E.g. if you have a definition like this one hg-asd: mwsicha* asp* mwscsg* slsportal* asdad* asdnam* asdmgmt* the script outputs a macro definition: $HG-ASD=mwsicha(.*)|asp(.*)|mwscsg(.*)|slsportal(.*)|asdad(.*)|asdnam(.*)|asdmgmt(.*) Put this in your hobbit-alerts.cfg, and you can define rules like this:You mean put the above macro definition in the hobbit-alerts.cfg file?
nevermind, the answer is yes and I had to RTFM for that :P
▸
HOST=%$HG-ASDMAIL user-ef86c43926b6@xymon.invalid SERVICE=httpetc.(I admit - it's untested, but it should definitely work. The expression at least is correct, and matches the hostnames it is supposed to match). Henrik
-- Asif Iqbal PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu "...it said: Install Windows XP or better...so I installed Solaris..."