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