check_rsnapshot.pl
changeset 18 a154e6fd3163
parent 17 083486eb053d
child 19 379eae48e070
equal deleted inserted replaced
17:083486eb053d 18:a154e6fd3163
   128         } else {
   128         } else {
   129             open(FH, $logfile)
   129             open(FH, $logfile)
   130               or print "RSNAPSHOT CRITICAL: $logfile - $!\n"
   130               or print "RSNAPSHOT CRITICAL: $logfile - $!\n"
   131               and exit $ERRORS{CRITICAL};
   131               and exit $ERRORS{CRITICAL};
   132             while (<FH>) {
   132             while (<FH>) {
       
   133                 next unless (/^\[$date/);
   133                 $found_in_file = $logfile;
   134                 $found_in_file = $logfile;
   134                 next unless (/^\[$date/);
       
   135                 if (/^\[$date:.*ERROR/) {
   135                 if (/^\[$date:.*ERROR/) {
   136                     $error = $_;
   136                     $error = $_;
   137                     last;
   137                     last;
   138                 }
   138                 }
   139             }
   139             }