[OpenIndiana-discuss] Monitor RAIDZ disk failure

Richard L. Hamilton rlhamil at smart.net
Mon Mar 1 10:03:38 UTC 2021


I would think that

fmadm faulty

would show that (and various other problems, too), or nothing if there was nothing wrong.

Or something like

zpool list|nawk 'BEGIN {bad=0} NR==1 {header=$0} NR>1 {if ($7!="ONLINE") {bad++;saved[bad]=$0}} END {if (bad>0) {print header;for (x in saved) print saved[x]}}'

should produce output (including the header) only if there are lines after the header where the 7th field is not "ONLINE".

Use sudo or RBAC if you choose the fmadm faulty command (because it needs privileges), and do that from a cron job; that will generate email (you do have your email set up correctly, right? :-) ) only if it generates output.

That's the easiest, probably. If you already have Xymon set up (or are willing to set it up, which requires some work for a server plus setup on each client), see https://wiki.xymonton.org/doku.php/monitors:bb-zfs

You were expecting maybe that the system would magically know who you are and send a telepathic message or at least a text message? :-) Good luck with that.


> On Mar 1, 2021, at 04:28, Thebest videos <sri.chityala504 at gmail.com> wrote:
> 
> 
> Hi Team,
> 
> i need to set an alert system(prometheus) for if any disk failures in RAIDZ
> like DEGRADED/OFFLINE. How can I set ? Any help would be appreciated?
> _______________________________________________
> openindiana-discuss mailing list
> openindiana-discuss at openindiana.org
> https://openindiana.org/mailman/listinfo/openindiana-discuss
> 



More information about the openindiana-discuss mailing list