From 2b3440a429e9a8838df99278fee5ad768adf71e9 Mon Sep 17 00:00:00 2001 From: "antipode.info" Date: Tue, 14 Apr 2020 23:29:53 +0200 Subject: [PATCH] Update zabbix-backuppc.pl Corrected so the values for hosts with spaces in their names are correctly proceeded. And escaped print for verification function. --- home/backuppc/scripts/zabbix-backuppc.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/home/backuppc/scripts/zabbix-backuppc.pl b/home/backuppc/scripts/zabbix-backuppc.pl index 80f28fa..2500ae0 100644 --- a/home/backuppc/scripts/zabbix-backuppc.pl +++ b/home/backuppc/scripts/zabbix-backuppc.pl @@ -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"); } }