> > That's what I was hoping, but it doesn't seem to be.
>
> Ah, I think I know what's happening. At line 208 of
> hobbitd/do_alert.c:
>
> n = strcspn(p, " \t");
> Should be
> n = strcspn(p, "\t $.,|%!()[]{}+?/&@:;*");
>
Almost. Now the --dump-config shows the macro expanded for the first group, but not the second.
For example, HOST=$group1,$group2 shows as HOST=group1member1,group1member2
--
Bruce Z. Lysik <blysik at shutterfly.com>
Operations Engineer
> -----Original Message-----
> From: Henrik Stoerner [mailto:henrik at hswn.dk]
> Sent: Tuesday, February 01, 2005 1:09 PM
> To: hobbit at hswn.dk
> Subject: Re: [hobbit] alerts macro feature request
>
>
> On Tue, Feb 01, 2005 at 10:09:34AM -0800, Bruce Lysik wrote:
> >
> > > > HOST=$GROUP1,$GROUP2 EXHOSTS=$SUBGROUP1,$SUBGROUP2
> > >
> > > If your macros are not regular expressions, then it
> should just work.
> >
>
> Henrik
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
> > HOST=$GROUP1,$GROUP2 EXHOSTS=$SUBGROUP1,$SUBGROUP2
>
> If your macros are not regular expressions, then it should just work.
That's what I was hoping, but it doesn't seem to be. I modified that shell script to create comma seperated lists of hosts.
So I have $GROUP1=host1,host2 and $GROUP2=host3,host4
And when I try to do HOST=$GROUP1,$GROUP2 and run ../bin/bbcmd --env=hobbitserver.cfg hobbitd_alert --dump-config:
HOST=
Just blank.
--
Bruce Z. Lysik <blysik at shutterfly.com>
Operations Engineer
> -----Original Message-----
> From: Henrik Stoerner [mailto:henrik at hswn.dk]
> Sent: Tuesday, February 01, 2005 7:37 AM
> To: hobbit at hswn.dk
> Subject: Re: [hobbit] alerts macro feature request
>
>
> On Mon, Jan 31, 2005 at 02:57:06PM -0800, Bruce Lysik wrote:
> > Hi,
> >
> > So I was defining an alert, when I tried to do this:
> >
> If they are regular expressions, I suppose it would work if you
> kept the "%" sign out of the expression, and did this:
>
> HOST=%$GROUP1|$GROUP2 EXHOSTS=$SUBGROUP1|$SUBGROUP2
>
>
> Henrik
>
> To unsubscribe from the hobbit list, send an e-mail to
> hobbit-unsubscribe at hswn.dk
>
>
Hi,
So I was defining an alert, when I tried to do this:
HOST=$GROUP1,$GROUP2 EXHOSTS=$SUBGROUP1,$SUBGROUP2
I don't know how hard this would be to fit in, but it could be useful.
--
Bruce Z. Lysik <blysik at shutterfly.com>
Operations Engineer
I had expected the RECOVERED keyword to apply only to the given
recipient - however the "recovered" mails are sent to all recipients in
the following rule.
HOST=host-1.noname4us.com
MAIL foo at noname4us.com
MAIL bar at noname4us.com RECOVERED
Another thing - a SCRIPT will be silently ignored if you don't provide a
RCPT - the script will not be run and no error messages will appear.
Both these problems appear in beta6.
Also, is there a mailing list archive of some sort?
/A
> >I'd like to be able to define a macro which replaces several
> > recipient lines. So for example, if many host groups always have a
> > set of four SCRIPT recipients, it would be nice to be able to just
> > define $STANDARDSCRIPTS at the top, and use that macro later.
>
> Why not simply have one script that calls the other four ?
Well, it's probably easier if I show you:
# SCRIPT /opt/bb/server/ext/email onduty SERVICE=procs RECOVERED
# SCRIPT /opt/bb/server/ext/email ops SERVICE=procs RECOVERED
# SCRIPT /opt/bb/server/ext/email onduty SERVICE=http,ping DURATION>6 RECOVERED
# SCRIPT /opt/bb/server/ext/email ops SERVICE=http,ping DURATION>6 RECOVERED
# SCRIPT /opt/bb/server/ext/email ops EXSERVICE=procs,http,ping RECOVERED
This set of recipient lines shows up often in my hobbit-alerts.cfg. I could trim it a bit if I modified the 'email' script to accept multiple addresses (5 lines to 3).
A related question: If I don't define COLOR anywhere in the rule, it should by default alert on 'red', correct?
--
Bruce Z. Lysik <blysik at shutterfly.com>
Operations Engineer
Hi,
So it would be nice to be able to set things like REPEAT=1h or RECOVERED at the top of the file, and have it apply to every rule. (Or set it somewhere.)
Also, is there any way to have hobbit only page on red and purple, and not yellow?
--
Bruce Z. Lysik <blysik at shutterfly.com>
Operations Engineer