Commit 2105d828 authored by Antoine Beaupré's avatar Antoine Beaupré

improve logging by showing the flag file used

parent 6655fa6b
...@@ -63,15 +63,15 @@ sub check_rdiff { ...@@ -63,15 +63,15 @@ sub check_rdiff {
if (/EndTime ([0-9]*).[0-9]* \((.*)\)/) { if (/EndTime ([0-9]*).[0-9]* \((.*)\)/) {
$last_bak = $1; $last_bak = $1;
$extra_msg = ' [backup.log]'; $extra_msg = ' [backup.log]';
$opt_v && print STDERR "found timestamp $1 ($2) in backup.log\n"; $opt_v && print STDERR "found timestamp $1 ($2) in $flag\n";
} }
} }
if (!$last_bak) { if (!$last_bak) {
print_status($host, $STATE_UNKNOWN, "cannot parse backup.log for a valid timestamp"); print_status($host, $STATE_UNKNOWN, "cannot parse $flag for a valid timestamp");
next; next;
} }
} else { } else {
$opt_v && print STDERR "cannot open backup.log\n"; $opt_v && print STDERR "cannot open $flag\n";
} }
close(FLAG); close(FLAG);
($state, $delta) = check_age($last_bak); ($state, $delta) = check_age($last_bak);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment