[OpenIndiana-discuss] Monitor RAIDZ disk failure

Stephan Althaus Stephan.Althaus at Duedinghausen.eu
Mon Mar 1 09:59:20 UTC 2021


On 03/01/21 10:28 AM, Thebest videos 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

Hi!

Do you like scripting ?


#!/usr/bin/bash
while :
do
  poolstatus=$(zpool status poolname)
  if echo "$poolstatus"|grep -E 'OFFLINE|DEGRAD' ; then
   echo "POOL IS OFFLINE OR DEGRADED"|sendmail -v my.email at my.domain
  fi
  sleep 30
done


Greetings,

Stephan




More information about the openindiana-discuss mailing list