mirror of https://github.com/jimsalterjrs/sanoid
let monitor-health check the capacity too
This commit is contained in:
parent
f6519c0aea
commit
1f64c9c35a
11
sanoid
11
sanoid
|
|
@ -798,6 +798,17 @@ sub check_zpool() {
|
|||
## determine health of zpool and subsequent error status
|
||||
if ($health eq "ONLINE" ) {
|
||||
$state = "OK";
|
||||
|
||||
# check capacity
|
||||
my $capn = $cap;
|
||||
$capn =~ s/\D//g;
|
||||
|
||||
if ($capn >= 80) {
|
||||
$state = "WARNING";
|
||||
}
|
||||
if ($capn >= 95) {
|
||||
$state = "CRITICAL";
|
||||
}
|
||||
} else {
|
||||
if ($health eq "DEGRADED") {
|
||||
$state = "WARNING";
|
||||
|
|
|
|||
Loading…
Reference in New Issue