Salut,
pour ton problème, ce serait quelque chose comme :
mdadm Monitor /dev/raiddevice -m admin@mydomain.com -d 3600 -f
pour monitorer /dev/raiddevice toutes les 3600 s (en tant que tsr) et envoyer un mail à admin@mydomain.com.
A lancer au démarrage en l'ajoutant dans /etc/inittab par exemple ou dans un script de /etc/init.d/...
man mdadm :
For Monitor mode:
-m, --mail
Give a mail address to send alerts to.
-p, --program, --alert
Give a program to be run whenever an event is detected.
-y, --syslog
Cause all events to be reported through ’syslog’. The messages have facility of ’daemon’ and varying priorities.
-d, --delay
Give a delay in seconds. mdadm polls the md arrays and then waits this many seconds before polling again. The default is 60 sec-
onds.
-f, --daemonise
Tell mdadm to run as a background daemon if it decides to monitor anything. This causes it to fork and run in the child, and to
disconnect form the terminal. The process id of the child is written to stdout. This is useful with --scan which will only con-
tinue monitoring if a mail address or alert program is found in the config file.
-i, --pid-file
When mdadm is running in daemon mode, write the pid of the daemon process to the specified file, instead of printing it on stan-
dard output.
-1, --oneshot
Check arrays only once. This will generate NewArray events and more significantly DegradedArray and SparesMissing events. Run-
ning
mdadm --monitor --scan -1
from a cron script will ensure regular notification of any degraded arrays.
-t, --test
Generate a TestMessage alert for every array found at startup. This alert gets mailed and passed to the alert program. This can
be used for testing that alert message do get through successfully.
[^] # Re: start|stop|restart|reload|status
Posté par papa35 . En réponse au message Alerte mdadm toutes les x heures. Évalué à -1.
pour ton problème, ce serait quelque chose comme :
mdadm Monitor /dev/raiddevice -m admin@mydomain.com -d 3600 -f
pour monitorer /dev/raiddevice toutes les 3600 s (en tant que tsr) et envoyer un mail à admin@mydomain.com.
A lancer au démarrage en l'ajoutant dans /etc/inittab par exemple ou dans un script de /etc/init.d/...
man mdadm :
For Monitor mode:
-m, --mail
Give a mail address to send alerts to.
-p, --program, --alert
Give a program to be run whenever an event is detected.
-y, --syslog
Cause all events to be reported through ’syslog’. The messages have facility of ’daemon’ and varying priorities.
-d, --delay
Give a delay in seconds. mdadm polls the md arrays and then waits this many seconds before polling again. The default is 60 sec-
onds.
-f, --daemonise
Tell mdadm to run as a background daemon if it decides to monitor anything. This causes it to fork and run in the child, and to
disconnect form the terminal. The process id of the child is written to stdout. This is useful with --scan which will only con-
tinue monitoring if a mail address or alert program is found in the config file.
-i, --pid-file
When mdadm is running in daemon mode, write the pid of the daemon process to the specified file, instead of printing it on stan-
dard output.
-1, --oneshot
Check arrays only once. This will generate NewArray events and more significantly DegradedArray and SparesMissing events. Run-
ning
mdadm --monitor --scan -1
from a cron script will ensure regular notification of any degraded arrays.
-t, --test
Generate a TestMessage alert for every array found at startup. This alert gets mailed and passed to the alert program. This can
be used for testing that alert message do get through successfully.