summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine Beaupré <anarcat@koumbit.org>2015-04-17 17:43:25 -0400
committerAntoine Beaupré <anarcat@koumbit.org>2015-04-17 17:43:25 -0400
commit2105d828ea5c3373289ab4e928bcde90bf6b40e1 (patch)
treef3149e70a6caa0d9e1ae7122dce2309da9da916a
parent6655fa6b36a6762ef372dc124cf055934279d540 (diff)
improve logging by showing the flag file used
-rwxr-xr-xfiles/checkbackups.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/files/checkbackups.pl b/files/checkbackups.pl
index 4eb293f..106463a 100755
--- a/files/checkbackups.pl
+++ b/files/checkbackups.pl
@@ -63,15 +63,15 @@ sub check_rdiff {
if (/EndTime ([0-9]*).[0-9]* \((.*)\)/) {
$last_bak = $1;
$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) {
- 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;
}
} else {
- $opt_v && print STDERR "cannot open backup.log\n";
+ $opt_v && print STDERR "cannot open $flag\n";
}
close(FLAG);
($state, $delta) = check_age($last_bak);