From a42985d36f8805cb99ee2ea10317d9fc7b50e23f Mon Sep 17 00:00:00 2001 From: Raphael Hertzog Date: Wed, 8 Apr 2009 08:04:47 +0000 Subject: [PATCH] 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. --- dsa-nagios-checks/checks/dsa-check-dabackup | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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"); }; -- 2.20.1