From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- web/attachments/241185-check_mailq.pl.patch | 46 +++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 web/attachments/241185-check_mailq.pl.patch (limited to 'web/attachments/241185-check_mailq.pl.patch') diff --git a/web/attachments/241185-check_mailq.pl.patch b/web/attachments/241185-check_mailq.pl.patch new file mode 100644 index 0000000..906234b --- /dev/null +++ b/web/attachments/241185-check_mailq.pl.patch @@ -0,0 +1,46 @@ +--- check_mailq.pl.orig 2006-07-05 15:45:57.000000000 +0200 ++++ check_mailq.pl 2007-08-14 13:32:15.463385010 +0200 +@@ -29,7 +29,7 @@ + use POSIX; + use strict; + use Getopt::Long; +-use vars qw($opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c $opt_t ++use vars qw($opt_d $opt_V $opt_h $opt_v $verbose $PROGNAME $opt_w $opt_c $opt_t + $opt_M $mailq $status $state $msg $msg_q $msg_p $opt_W $opt_C $mailq @lines + %srcdomains %dstdomains); + use lib utils.pm; +@@ -515,12 +515,17 @@ + ("V" => \$opt_V, "version" => \$opt_V, + "v" => \$opt_v, "verbose" => \$opt_v, + "h" => \$opt_h, "help" => \$opt_h, ++ "d:s" => \$opt_d, "configdir:s" => \$opt_d, + "M:s" => \$opt_M, "mailserver:s" => \$opt_M, # mailserver (default sendmail) + "w=i" => \$opt_w, "warning=i" => \$opt_w, # warning if above this number + "c=i" => \$opt_c, "critical=i" => \$opt_c, # critical if above this number + "t=i" => \$opt_t, "timeout=i" => \$opt_t + ); + ++ if ($opt_d) { ++ $ENV{'MAIL_CONFIG'}=$opt_d; ++ } ++ + if ($opt_V) { + print_revision($PROGNAME,'$Revision: 1.7 $ '); + exit $ERRORS{'OK'}; +@@ -576,7 +581,7 @@ + } + + sub print_usage () { +- print "Usage: $PROGNAME -w -c [-W ] [-C ] [-M ] [-t ] [-v verbose]\n"; ++ print "Usage: $PROGNAME -d -w -c [-W ] [-C ] [-M ] [-t ] [-v verbose]\n"; + } + + sub print_help () { +@@ -587,6 +592,7 @@ + print "\n"; + print " Checks the number of messages in the mail queue (supports multiple sendmail queues, qmail)\n"; + print " Feedback/patches to support non-sendmail mailqueue welcome\n\n"; ++ print "-d (--configdir) = Use configdir for postfix command (MAIL_CONFIG)\n"; + print "-w (--warning) = Min. number of messages in queue to generate warning\n"; + print "-c (--critical) = Min. number of messages in queu to generate critical alert ( w < c )\n"; + print "-W (--Warning) = Min. number of messages for same domain in queue to generate warning\n"; -- cgit v1.2.3-74-g34f1