ZFS Detect Unavailable Disks in ZFS

ItMan

New Member


Messages: 19

Hi All,
I have many pool , i want i get a message from ZFS automatically, when disk get Unavailable state ,

is it possible?

The Best Regards,
 

ShelLuser

Son of Beastie

Reaction score: 2,112
Messages: 3,792

This functionality is somewhat provided by default through the periodic system.

Just add:
Code:
daily_status_zfs_enable="YES"
... to /etc/periodic.conf and you'll be all set. However, all this does is sent you a daily status report for your ZFS pools. I'd assume you could simply use some mail client filter rules to check for anything matching degraded.

Another option is to write such a script yourself: zpool status | grep -i degraded should be enough. If you run that through crontab then it will only produce output whenever a pool is degraded, and cron only sends e-mails when commands produce any output.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,744
Messages: 39,332

I have many pool , i want i get a message from ZFS automatically, when disk get Unavailable state ,
I assume you have some monitoring system in place, Nagios, Zabbix, Munin, or something else? That's what you should use to create alerts.
 
Top