I want to share my experience:
So I decided to use pushover APP on ios to get alerts. ZED supports that.
1. Download the app, register your user and a new applicaton. You get a user token and an app token.
2. Open (as sudo) /etc/zfs/zed.d/zed.rc
3. Edit the following sections:
(for testing I set verbosity to 1, will turn it back to 0 later)
- Code: Select all
##
# Notification verbosity.
# If set to 0, suppress notification if the pool is healthy.
# If set to 1, send notification regardless of pool health.
#
ZED_NOTIFY_VERBOSE=1
...
##
# Pushover token.
# This defines the application from which the notification will be sent.
# <https://pushover.net/api#registration>
# Disabled by default; uncomment to enable.
# ZED_PUSHOVER_USER, below, must also be configured.
#
ZED_PUSHOVER_TOKEN="<Your_App_Token>"
##
# Pushover user key.
# This defines which user or group will receive Pushover notifications.
# <https://pushover.net/api#identifiers>
# Disabled by default; uncomment to enable.
# ZED_PUSHOVER_TOKEN, above, must also be configured.
ZED_PUSHOVER_USER="<Your_User_Token>"
After that, run:
- Code: Select all
ps aux | grep zed
output:
- Code: Select all
root <your_process_id> 0.0 0.0 409087488 1904 ?? Ss Wed11AM 0:00.12 /usr/local/zfs/bin/zed -vfF
And then execute HUP with the process ID you got:
- Code: Select all
sudo kill -HUP <your_process_id>
Test by creating a sparse image pool and scrub it:
- Code: Select all
cd /tmp
dd if=/dev/zero of=sparse_file bs=1 count=0 seek=512M
sudo zpool create test /tmp/sparse_file
sudo zpool scrub test
This should get you an alert on the pushover app.