diff options
Diffstat (limited to 'plugins-scripts/check_mailq.pl')
-rwxr-xr-x | plugins-scripts/check_mailq.pl | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins-scripts/check_mailq.pl b/plugins-scripts/check_mailq.pl index 9ef292e..4bc9487 100755 --- a/plugins-scripts/check_mailq.pl +++ b/plugins-scripts/check_mailq.pl | |||
@@ -539,7 +539,7 @@ elsif ( $mailq eq "nullmailer" ) { | |||
539 | while (<MAILQ>) { | 539 | while (<MAILQ>) { |
540 | #2006-06-22 16:00:00 282 bytes | 540 | #2006-06-22 16:00:00 282 bytes |
541 | 541 | ||
542 | if (/^[1-9][0-9]*-[01][0-9]-[0-3][0-9]\s[0-2][0-9]\:[0-2][0-9]\:[0-2][0-9]\s{2}[0-9]+\sbytes$/) { | 542 | if (/^[1-9][0-9]*-[01][0-9]-[0-3][0-9]\s[0-2][0-9]\:[0-5][0-9]\:[0-5][0-9]\s+[0-9]+\sbytes/) { |
543 | $msg_q++ ; | 543 | $msg_q++ ; |
544 | } | 544 | } |
545 | } | 545 | } |
@@ -576,6 +576,8 @@ sub process_arguments(){ | |||
576 | "t=i" => \$opt_t, "timeout=i" => \$opt_t, | 576 | "t=i" => \$opt_t, "timeout=i" => \$opt_t, |
577 | "s" => \$opt_s, "sudo" => \$opt_s, | 577 | "s" => \$opt_s, "sudo" => \$opt_s, |
578 | "d:s" => \$opt_d, "configdir:s" => \$opt_d | 578 | "d:s" => \$opt_d, "configdir:s" => \$opt_d |
579 | "W=i" => \$opt_W, # warning if above this number | ||
580 | "C=i" => \$opt_C, # critical if above this number | ||
579 | ); | 581 | ); |
580 | 582 | ||
581 | if ($opt_V) { | 583 | if ($opt_V) { |
@@ -669,8 +671,8 @@ sub print_help () { | |||
669 | print " Feedback/patches to support non-sendmail mailqueue welcome\n\n"; | 671 | print " Feedback/patches to support non-sendmail mailqueue welcome\n\n"; |
670 | print "-w (--warning) = Min. number of messages in queue to generate warning\n"; | 672 | print "-w (--warning) = Min. number of messages in queue to generate warning\n"; |
671 | print "-c (--critical) = Min. number of messages in queue to generate critical alert ( w < c )\n"; | 673 | print "-c (--critical) = Min. number of messages in queue to generate critical alert ( w < c )\n"; |
672 | print "-W (--Warning) = Min. number of messages for same domain in queue to generate warning\n"; | 674 | print "-W = Min. number of messages for same domain in queue to generate warning\n"; |
673 | print "-C (--Critical) = Min. number of messages for same domain in queue to generate critical alert ( W < C )\n"; | 675 | print "-C = Min. number of messages for same domain in queue to generate critical alert ( W < C )\n"; |
674 | print "-t (--timeout) = Plugin timeout in seconds (default = $utils::TIMEOUT)\n"; | 676 | print "-t (--timeout) = Plugin timeout in seconds (default = $utils::TIMEOUT)\n"; |
675 | print "-M (--mailserver) = [ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)\n"; | 677 | print "-M (--mailserver) = [ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)\n"; |
676 | print "-s (--sudo) = Use sudo to call the mailq command\n"; | 678 | print "-s (--sudo) = Use sudo to call the mailq command\n"; |