Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| linux:zfs [2024/06/23 21:42] – [ZFS backup] admin | linux:zfs [2025/02/05 12:49] (current) – [ZFS - notification] admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== Linux ZFS ====== | ====== Linux ZFS ====== | ||
| + | https:// | ||
| < | < | ||
| <code BASH> | <code BASH> | ||
| Line 62: | Line 63: | ||
| </ | </ | ||
| ++++ | ++++ | ||
| + | |||
| + | |||
| + | ===== ZFS - notification ===== | ||
| + | ++++ telegram notification zfs| | ||
| + | <code BASH> | ||
| + | # https:// | ||
| + | nano / | ||
| + | |||
| + | #!/bin/bash | ||
| + | TELEGRAM_BOT_TOKEN=" | ||
| + | TELEGRAM_CHAT_ID=" | ||
| + | |||
| + | subject=" | ||
| + | details=" | ||
| + | |||
| + | MESSAGE=" | ||
| + | Event: $subject | ||
| + | Details: | ||
| + | $details" | ||
| + | |||
| + | curl -s -X POST " | ||
| + | -d " | ||
| + | -d " | ||
| + | |||
| + | chmod +x / | ||
| + | |||
| + | # zed-functions.sh Modified zed_notify function | ||
| + | zed_notify() | ||
| + | { | ||
| + | zed_notify_email " | ||
| + | [ " | ||
| + | [ " | ||
| + | |||
| + | # Execute external Telegram script if it exists | ||
| + | if [ -x "/ | ||
| + | / | ||
| + | [ " | ||
| + | [ " | ||
| + | fi | ||
| + | } | ||
| + | </ | ||
| + | ++++ | ||
| + | |||
| + | |||
| Line 85: | Line 130: | ||
| zpool remove rpool / | zpool remove rpool / | ||
| </ | </ | ||
| + | |||
| + | ===== ZFS monitoring ===== | ||
| + | https:// | ||
| + | https:// | ||
| + | |||
| + | |||