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 <[email protected]> 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
> [email protected]
> https://openindiana.org/mailman/listinfo/openindiana-discuss
>
_______________________________________________
openindiana-discuss mailing list
[email protected]
https://openindiana.org/mailman/listinfo/openindiana-discuss