check_rsnapshot.pl
changeset 19 379eae48e070
parent 18 a154e6fd3163
child 20 fb36e0e666d7
equal deleted inserted replaced
18:a154e6fd3163 19:379eae48e070
    98     for my $logfile (@{$logfiles}) {
    98     for my $logfile (@{$logfiles}) {
    99 
    99 
   100         unless (-e $logfile) {
   100         unless (-e $logfile) {
   101             print "RSNAPSHOT CRITICAL: logfile '$logfile' - don't exists\n";
   101             print "RSNAPSHOT CRITICAL: logfile '$logfile' - don't exists\n";
   102             exit $ERRORS{CRITICAL};
   102             exit $ERRORS{CRITICAL};
   103         }
       
   104 
       
   105         if (-z $logfile) {
       
   106             print "RSNAPSHOT WARNING: logfile $logfile - has zero size\n";
       
   107             exit $ERRORS{WARNING};
       
   108         }
   103         }
   109 
   104 
   110         next if (stat $logfile)[9] < $maxage;
   105         next if (stat $logfile)[9] < $maxage;
   111 
   106 
   112         if ($logfile =~ /\.gz$/) {
   107         if ($logfile =~ /\.gz$/) {