From 2105d828ea5c3373289ab4e928bcde90bf6b40e1 Mon Sep 17 00:00:00 2001 From: Antoine Beaupré Date: Fri, 17 Apr 2015 17:43:25 -0400 Subject: improve logging by showing the flag file used --- files/checkbackups.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'files') 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); -- cgit v1.2.3