Thread (1 message) 1 message, 1 author, 2002-05-17
  • (off-list ancestor, not in this archive)
  • Re: mdadm --monitor · Neil Brown <hidden> · 2002-05-17

Re: mdadm --monitor

From: Neil Brown <hidden>
Date: 2002-05-17 06:59:31

On Friday May 17, danci@agenda.si wrote:
On Thu, 16 May 2002, Neil Brown wrote:
quoted
quoted
[root]# cat /usr/local/sbin/raidalert:

#!/bin/bash
#
#

logger -p kern.crit -t RAID

Try
   logger -p kern.crit -t RAID $*

the program doesn't get anything on stdin.  I just gets 2 or three
command-line arguments.
Oh, I see! Yes, this way it does work... :)

Maybe you should explain this explicitly or even add the above example to
the docs.

  D.
The documentation in mdadm.conf.5 seems suitably explicit:

The
.B program
line gives the name of a program to be run when
.B "mdadm --monitor"
detects potentially interesting events on any of the arrays that it
is monitoring.  This program gets run with two or three arguments, they
being the Event, the md device, and possibly the related component
device.


mdadm.8 however doesn't seem explicit at all :-(
I have added:

When passing event to program, the program is run once for each event
and is given 2 or 3 command-line arguements.  The first is the
name of the event (see below).  The second is the name of the
md device which is affected, and the third is the name of a related
device if relevant, such as a componenet device that has failed.

just after


The result of monitoring the arrays is the generation of events.
These events are passed to a separate program (if specified) and may
be mailed to a given E-mail address.


Thanks,
NeilBrown
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help