[hobbit] hobbit-alerts.cfg -- Perl regex
Werner Michels (Ext Lists)
wmlist_ext at terra.com.br
Thu Aug 11 20:07:47 CEST 2005
Robert,
Please try change the HG definition as:
$HG-WinSvrsCrit=%nyc(app1|dc1|dc2|ex1|ex03|fs1|fs2|time).domain.com
Observe that the "%" is the first char and this indicates that your using perl regex.
With this change your host group should work fine.
-wm
On Thu, 11 Aug 2005 13:07:05 -0400
Robert Herron <robert.herron at gmail.com> wrote:
> I'm having a problem with Perl regular expressions in the
> hobbit-alerts.cfg file. Can someone tell me what I'm doing wrong:
>
> Background info: our servers are named by location, function, number
> (e.g. NYCMAIL1). As our data center in "NYC", a lot of systems's
> names start with NYC.
>
> I'm lazy and really don't want to have to type NYC over and over
> again. So, I tried using a macro with a wildcard like:
>
> $HG-WinSvrsCrit=nyc%(app1|dc1|dc2|ex1|ex03|fs1|fs2|time).domain.com
>
> but it doesn't work. However, it works if I change it to:
>
> $HG-WinSvrsCrit=%(nycapp1|nycdc1|nycdc2|nycex1|nycex03|nycfs1|nycfs2|nyctime).domain.com
>
>
> The $HG-WinSvrsCrit wildcard is used later in hobbit-alerts.cfg with
> statements like:
>
> HOST=$HG-WinSvrsCrit $OPTIONS EXSERVICE=smtp,oradb
> MAIL bb_NetAdm
> MAIL bb_SrPCT
> MAIL bb_ProjMgr DURATION>60m
>
> A "~/server/bin/hobbitd_alert --dump_config" looks correct for the
> desired macro/wildcard combo:
>
> HOST=nyc%(app1|dc1|dc2|ex1|ex03|fs1|fs2|gis2|time).domain.com
> EXSERVICE=smtp,oradb COLOR=purple,red
> MAIL bb_NetAdm FORMAT=TEXT REPEAT=30
> MAIL bb_SrPCT FORMAT=TEXT REPEAT=30
> MAIL bb_ProjMgr FORMAT=TEXT REPEAT=30 DURATION>60
>
> But the INFO page for the nyc[app1|dc1|dc2|ex1|ex03|fs1|fs2|gis2|time]
> hosts only shows UNMATCHED catch-all entry.
>
> I'm stumped. Please help.
> --
>
>
> Robert Herron
> robert.herron at gmail.com
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
>
> E-mail classificado pelo Identificador de Spam Inteligente Terra.
> Para alterar a categoria classificada, visite
> http://mail.terra.com.br/protected_email/imail/imail.cgi?+_u=wmlistas&_l=1,1123780209.882174.29442.casama.terra.com.br,3853,Des15,Des15
>
More information about the Xymon
mailing list