I just saw by luck that one of my zpool is degraded!: $ zpool list NAME SIZE USED AVAIL CAP HEALTH ALTROOT home 97,5G 773M 96,7G 0% ONLINE - rpool 10,6G 7,78G 2,85G 73% DEGRADED - It would be nice if gnome could notify me automatically when one of my zpools are degraded or if any kind of ZFS error occurs. It should be possible. I know that in Ubuntu they have included a mechanism to create manually notify messages on the desktop, like the "update notification" messages. I would also accept if it could be possible at least to send automatically a mail when a zpool is degraded. Could it be possible to implement for the next release a ZFS monitoring or alert mechanism? -- This message posted from opensolaris.org
Bob Friesenhahn
2008-Dec-28 22:19 UTC
[zfs-discuss] Degraded zpool without any kind of alert
On Sun, 28 Dec 2008, Robert Bauer wrote:> It would be nice if gnome could notify me automatically when one of > my zpools are degraded or if any kind of ZFS error occurs.Yes. It is a weird failing of Solaris to have an advanced fault detection system without a useful reporting mechanism.> I would also accept if it could be possible at least to send > automatically a mail when a zpool is degraded.This the script (run as root via crontab) I use to have an email sent to ''root'' if a fault is detected. It has already reported a fault: #!/bin/sh REPORT=/tmp/faultreport.txt SYSTEM=$1 rm -f $REPORT /usr/sbin/fmadm faulty 2>&1 > $REPORT if test -s $REPORT then /usr/ucb/Mail -s "$SYSTEM Fault Alert" root < $REPORT fi rm -f $REPORT =====================================Bob Friesenhahn bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/ GraphicsMagick Maintainer, http://www.GraphicsMagick.org/
Matt Harrison
2008-Dec-28 22:25 UTC
[zfs-discuss] Degraded zpool without any kind of alert
Bob Friesenhahn wrote:> On Sun, 28 Dec 2008, Robert Bauer wrote: > >> It would be nice if gnome could notify me automatically when one of >> my zpools are degraded or if any kind of ZFS error occurs. > > Yes. It is a weird failing of Solaris to have an advanced fault > detection system without a useful reporting mechanism. > >> I would also accept if it could be possible at least to send >> automatically a mail when a zpool is degraded. > > This the script (run as root via crontab) I use to have an email sent > to ''root'' if a fault is detected. It has already reported a fault: > > #!/bin/sh > REPORT=/tmp/faultreport.txt > SYSTEM=$1 > rm -f $REPORT > /usr/sbin/fmadm faulty 2>&1 > $REPORT > if test -s $REPORT > then > /usr/ucb/Mail -s "$SYSTEM Fault Alert" root < $REPORT > fi > rm -f $REPORTI do much the same thing, although I had to fiddle it a bit to exclude a certain report type. A while ago, a server here started to send out errors from: Fault class : defect.sunos.eft.undiagnosable_problem The guys on the fault-discuss list have been unable to enlighten me as to the problem, and I''m ashamed to say I have not taken any steps. Except to replace the entire machine, I have no idea what to try. I just wanted to note that although the fault detection is very good, it isn''t always possible to work out what the fault really is. Matt