check_amanda.pl
changeset 1 0990f72db33c
parent 0 2098311fb227
child 5 70171296c9fc
equal deleted inserted replaced
0:2098311fb227 1:0990f72db33c
    78     my $last_backup_date;
    78     my $last_backup_date;
    79     my $mesg = undef;
    79     my $mesg = undef;
    80     my $rc   = "CRITICAL";
    80     my $rc   = "CRITICAL";
    81 
    81 
    82     foreach (`$opt{binary} --config $configfile --error`) {
    82     foreach (`$opt{binary} --config $configfile --error`) {
    83         /^Using.*from\s+(.*)$/ and $last_backup_date = $1 and next;
    83 	/^Using / and next;
       
    84         /^From\s+(.*)$/ and $last_backup_date = $1 and next;
    84         /^\S+/ and $mesg = "some failed backups" and last;
    85         /^\S+/ and $mesg = "some failed backups" and last;
    85     }
    86     }
    86 
    87 
    87     # report critical status at any errors
    88     # report critical status at any errors
    88     if ($mesg) {
    89     if ($mesg) {