dropped 'zero size' warning because it would terminate the check even if there are more files to check and i don't actually consider this warning useful (the check will still fail if the rsnapshot run can't be found in any of the specified log files - whether they are empty or not)
authorMatthias Förste <foerste@schlittermann.de>
Tue, 02 Apr 2013 10:27:33 +0200
changeset 19 379eae48e070
parent 18 a154e6fd3163
child 20 fb36e0e666d7
dropped 'zero size' warning because it would terminate the check even if there are more files to check and i don't actually consider this warning useful (the check will still fail if the rsnapshot run can't be found in any of the specified log files - whether they are empty or not)
check_rsnapshot.pl
--- a/check_rsnapshot.pl	Tue Apr 02 10:10:06 2013 +0200
+++ b/check_rsnapshot.pl	Tue Apr 02 10:27:33 2013 +0200
@@ -102,11 +102,6 @@
             exit $ERRORS{CRITICAL};
         }
 
-        if (-z $logfile) {
-            print "RSNAPSHOT WARNING: logfile $logfile - has zero size\n";
-            exit $ERRORS{WARNING};
-        }
-
         next if (stat $logfile)[9] < $maxage;
 
         if ($logfile =~ /\.gz$/) {