zabbix scripts monit zfs
This commit is contained in:
17
service/zabbix/check_zfs.pl
Normal file
17
service/zabbix/check_zfs.pl
Normal 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";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user