fixed "RSNAPSHOT CRITICAL: [27/Feb/2018:00:21:02] /usr/bin/rsnapshot sync: started" ($date is used inside regular expression and thus needs to be parenthesised)
--- a/check_rsnapshot.pl Tue Feb 13 15:40:15 2018 +0100
+++ b/check_rsnapshot.pl Tue Feb 27 10:30:09 2018 +0100
@@ -42,7 +42,7 @@
sub version($$);
my $ME = basename $0;
-my $VERSION = "2.10";
+my $VERSION = "2.10.1";
my %opt = (
binary => "/usr/bin/rsnapshot",
@@ -64,7 +64,7 @@
my @logfiles = @ARGV ? @ARGV : glob '/var/log/rsnapshot.log{,.1.gz}';
# older versions log the date as %d/%b/%Y
- my $date = UnixDate(ParseDate($opt{date}), "%d/%b/%Y|%Y-%m-%d");
+ my $date = UnixDate(ParseDate($opt{date}), "(%d/%b/%Y|%Y-%m-%d)");
unless ($date) {
print "RSNAPSHOT CRITICAL: can't parse date [$opt{date}]\n";
exit $ERRORS{CRITICAL};