From: Raphael Hertzog Date: Wed, 8 Apr 2009 08:04:47 +0000 (+0000) Subject: dsa-check-dabackup: add command-line options to override limits X-Git-Url: https://wiki.adam-barratt.org.uk/gitweb/?a=commitdiff_plain;h=a42985d36f8805cb99ee2ea10317d9fc7b50e23f;p=mirror%2Fdsa-nagios.git dsa-check-dabackup: add command-line options to override limits Alioth has a backup module that takes 30 minutes in the rsync "building file list" stage and during this period the file is not modified and the check should fallback on the previous log file. The $TOO_FRESH value is too low for us. --- diff --git a/dsa-nagios-checks/checks/dsa-check-dabackup b/dsa-nagios-checks/checks/dsa-check-dabackup index f400023..6ce30b2 100755 --- a/dsa-nagios-checks/checks/dsa-check-dabackup +++ b/dsa-nagios-checks/checks/dsa-check-dabackup @@ -60,7 +60,7 @@ sub help($$) { my ($exitcode, $fd) = @_; version ($fd, 0); print $fd "Usage: $PROGRAM_NAME --help\n"; - print $fd "Usage: $PROGRAM_NAME"; + print $fd "Usage: $PROGRAM_NAME [--fresh ] [--maxage ]"; exit $exitcode }; @@ -69,6 +69,8 @@ my $params = {}; Getopt::Long::config('bundling'); if (!GetOptions ( 'h|help' => \$params->{'help'}, + 'f|fresh=i' => \$TOO_FRESH, + 'm|maxage=i' => \$MAX_AGE, )) { die ("$PROGRAM_NAME: Usage: $PROGRAM_NAME [-fwhv]\n"); };