Note: "permalinks" may not be as permanent as we would like,
direct links of old sources may well be a few messages off.
On Monday 05 November 2007 13:32:20 Igor Neves wrote:
> Hi,
>
> There is some kind of notification (email, execute some script or
> something) implemented in drbd?
>
> I need DRBD to be reactive to some situations:
> * Split-Brain (IMPORTANT)
> * State Change (primary->secondary) (LESS IMPORTANT)
> * Sync's (MUCH LESS IMPORTANT)
> * ...
>
> I can do some cron job script, to parse the output of '/proc/drbd'
> every minute of so, but i want something more professional. It's there
> anything something like this in DRBD?
>
You can attach "handler" scripts to some of these events.
handlers {
split-brain "echo split-brain. drbdadm -- --discard-my-data connect $DRBD_RESOURCE ? | mail -s 'DRBD Alert' root";
}
Look out for "handers" in man drbd.conf
-Phil
--
: Dipl-Ing Philipp Reisner Tel +43-1-8178292-50 :
: LINBIT Information Technologies GmbH Fax +43-1-8178292-82 :
: Vivenotgasse 48, 1120 Vienna, Austria http://www.linbit.com :