zabbix scripts monit zfs

This commit is contained in:
2026-01-12 01:21:54 +04:00
parent b5c4a90c6a
commit 134febbc9c
2 changed files with 28 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
#!/usr/bin/env perl
use strict;
use warnings;
my $ZPOOL = '/sbin/zpool';
my $status_output = `$ZPOOL status 2>/dev/null`;
if ($? != 0) {
print "The zfs file system was not found\n";
exit 0
}
if ($status_output =~ /degraded/i) {
print "degraded\n";
}