Update zabbix-backuppc.pl
Corrected so the values for hosts with spaces in their names are correctly proceeded. And escaped print for verification function.
This commit is contained in:
parent
1eefaa5dc6
commit
2b3440a429
@ -36,7 +36,7 @@ foreach my $key (keys %Val) {
|
||||
if ($Var{$key})
|
||||
{
|
||||
zabbix_post($Var{$key},$Val{$key});
|
||||
print "$Var{$key} | $Val{$key}\n";
|
||||
#print "$Var{$key} | $Val{$key}\n";
|
||||
}
|
||||
}
|
||||
print "1";
|
||||
@ -344,7 +344,7 @@ sub zabbix_post {
|
||||
my @servers = split(',', $zabbix_server);
|
||||
|
||||
foreach my $server (@servers) {
|
||||
my $cmd = "zabbix_sender -z $server -p 10051 -s $zabbix_host -k $key -o '$val'";
|
||||
my $cmd = "zabbix_sender -z $server -p 10051 -s $zabbix_host -k '$key' -o '$val'";
|
||||
system("$cmd >/dev/null");
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user