[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] alerting macros
On Tue, Feb 01, 2005 at 10:19:27AM -0800, Bruce Lysik wrote:
> > > A related question: If I don't define COLOR anywhere in the rule, it
> > > should by default alert on 'red', correct?
> >
> > To be exact, it will alert on the colors defined with the
> > "--alert-colors" option, but the default for that is to alert on red,
> > yellow and purple.
>
> Aha. That's useful. Is that a switch to hobbitd that I can add in
> hobbitlaunch.cfg? (I want to set it to just red and purple.) And
> if I do make that change, can I override it on a per alert basis
> with the COLOR option?
This option exists for both hobbitd and hobbitd_alert, and yes - you
do set it in the hobbitlaunch.cfg file.
For hobbitd, it defines what colors of a status are sent off to the
hobbitd_alert module, which handles alerts. hobbitd has both a
--alertcolors option to define which colors indicate a critical
state, and a --okcolors option to define which are OK.
(A color can be neither an alert- nor an ok-color - e.g. you can have
"red" as an alert-color, and "green" as OK, but "yellow" as neither of
these, meaning that alerts will start to go out when a status goes
red, but the recovery-message will only appear when it goes green -
not if it only goes yellow).
So for hobbitd, you must specify the --alertcolors option to include
any color that you want to get alerts for. You cannot override it on
a per-alert basis, because the alert module will never see e.g. a
message with color "yellow", if you run hobbitd with
"--alertcolors=red,purple".
For hobbitd_alert, the --alertcolors option is only used to determine
if an incoming message is for an alert or a recovery message. So the
--alertcolors option for hobbitd and hobbitd_alert must match.
Henrik