Additional scripts for Zabbix agent on Linux to discover and monitor several services
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
277 B

#!/usr/bin/perl -w
use strict;
use warnings;
use JSON;
use File::Which;
my $json;
@{$json->{data}} = ();
my $zpool = which('zpool');
if ($zpool){
foreach (qx($zpool list -H -o name)){
chomp;
push @{$json->{data}}, { '{#ZPOOL}' => $_ };
}
}
print to_json($json);