From f51a6a930da88911f9765c688537dad8152a89d5 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 11 Dec 2019 18:42:20 +0100 Subject: [PATCH] Fix BackupPC script when BackuPPC_link is waiting for the nightly cleanup to finish --- zabbix_scripts/check_backuppc_sudo | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zabbix_scripts/check_backuppc_sudo b/zabbix_scripts/check_backuppc_sudo index 8a46b02..d84195a 100644 --- a/zabbix_scripts/check_backuppc_sudo +++ b/zabbix_scripts/check_backuppc_sudo @@ -63,7 +63,9 @@ if ( $host ) { } # Push all the sizes in our data set to compute avg sizes # Exclude backup N°0 as it'll always have much more new data than normal backups - $sizes->add_data($backup->{sizeNew}) unless ( $backup->{num} == 0 ); + # Also exclude if size is not defined. This can happen in BackupPC v3 when + # the link process is waiting for the nightly to finish + $sizes->add_data($backup->{sizeNew}) unless ( $backup->{num} == 0 || !$backup->{sizeNew} ); $json->{bkp}++; }