equal
deleted
inserted
replaced
35 sub get_status($); |
35 sub get_status($); |
36 sub report($); |
36 sub report($); |
37 sub version($$); |
37 sub version($$); |
38 |
38 |
39 my $ME = basename $0; |
39 my $ME = basename $0; |
40 my $VERSION = "2.1"; |
40 my $VERSION = "2.2"; |
41 |
41 |
42 my %opt = ( |
42 my %opt = ( |
43 binary => "/usr/bin/rsnapshot", |
43 binary => "/usr/bin/rsnapshot", |
44 logfile => "/var/log/rsnapshot.log", |
44 logfile => "/var/log/rsnapshot.log", |
45 seconds => 86400, |
45 seconds => 86400, |
118 print "RSNAPSHOT OK: no errors in $logfile\n"; |
118 print "RSNAPSHOT OK: no errors in $logfile\n"; |
119 exit $ERRORS{OK}; |
119 exit $ERRORS{OK}; |
120 } |
120 } |
121 } |
121 } |
122 |
122 |
|
123 sub version($$) { |
|
124 my $progname = shift; |
|
125 my $version = shift; |
|
126 |
|
127 print <<_VERSION; |
|
128 $progname version $version |
|
129 Copyright (C) 2011 by Christian Arnold and Schlittermann internet & unix support. |
|
130 |
|
131 $ME comes with ABSOLUTELY NO WARRANTY. This is free software, |
|
132 and you are welcome to redistribute it under certain conditions. |
|
133 See the GNU General Public Licence for details. |
|
134 _VERSION |
|
135 } |
|
136 |
123 =head1 NAME |
137 =head1 NAME |
124 |
138 |
125 check_rsnapshot - nagios plugin to check for errors on rsnapshot logfile |
139 check_rsnapshot - nagios plugin to check for errors on rsnapshot logfile |
126 |
140 |
127 =head1 SYNOPSIS |
141 =head1 SYNOPSIS |
176 |
190 |
177 check_rsnapshot -s 172800 -l /var/log/rsnapshot/rsnapshot.log -d "2 days ago" |
191 check_rsnapshot -s 172800 -l /var/log/rsnapshot/rsnapshot.log -d "2 days ago" |
178 |
192 |
179 =head1 VERSION |
193 =head1 VERSION |
180 |
194 |
181 This man page is current for version 2.1 of check_rsnapshot. |
195 This man page is current for version 2.2 of check_rsnapshot. |
182 |
196 |
183 =head1 AUTHOR |
197 =head1 AUTHOR |
184 |
198 |
185 Written by Christian Arnold L<arnold@schlittermann.de> |
199 Written by Christian Arnold L<arnold@schlittermann.de> |
186 |
200 |