From: James Bunton Date: Wed, 17 Jun 2020 13:00:51 +0000 (+1000) Subject: healthcheck: zpool-health X-Git-Url: https://code.delx.au/monosys/commitdiff_plain/a1b3a9a05cbf707d347a9cc69df209e7b4a1b8cf?hp=60301a432ceee9018d9525e18d9b34bfa24a74dc healthcheck: zpool-health --- diff --git a/healthcheck/zpool-health b/healthcheck/zpool-health new file mode 100755 index 0000000..0864b80 --- /dev/null +++ b/healthcheck/zpool-health @@ -0,0 +1,9 @@ +#!/bin/bash + +if ! command -v zpool > /dev/null; then + exit 0 +fi + +if zpool list -H -o health,name | grep -qv ONLINE; then + zpool status -v +fi