diff --git a/check_backuppc b/check_backuppc index 146caf5..da7cc17 100755 --- a/check_backuppc +++ b/check_backuppc @@ -221,7 +221,7 @@ if ( $statusCode eq 'OK' ) { next if (@hostsExcluded and grep {/^$host$/} @hostsExcluded); next if ( $Status{$host}{BackupsDisable} ); next if ($Status{$host}{'type'} eq 'archive'); - if ( $Status{$host}{statusCode} ne 'OK' ) { + if ( $Status{$host}{statusCode} && $Status{$host}{statusCode} ne 'OK' ) { $statusMsg .= ", " unless ( $first_host ); $statusMsg .= "$host: ".$Status{$host}{statusCode}." - ".$Status{$host}{statusMsg}; $first_host = 0 if ( $first_host );