]> git.pld-linux.org Git - packages/nagios-plugins.git/commitdiff
up to 2.0.3, security fixes auto/th/nagios-plugins-2.0.3-1
authorElan Ruusamäe <glen@delfi.ee>
Sat, 11 Apr 2015 21:58:22 +0000 (00:58 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Sat, 11 Apr 2015 21:58:22 +0000 (00:58 +0300)
mawk-workaround.patch
nagios-plugins.spec

index c71fd1eff5296cb065325e41f605dc6c31da1dce..12cbbab027a9328ec0a7681830db7ca76ed9220f 100644 (file)
@@ -6,37 +6,167 @@ mawk: run time error: regular expression compile failed (missing operand)
 /usr/lib/nullmailer' || -d '/usr/local/lib/nullmailer
         FILENAME="check_mailq.pl" FNR=627 NR=627
 
+however upstream removed autodetection (GRRR), revert that change
+https://nagios-plugins.org/nagios-plugins-2-0-3-released/
 
 this is resolved differently in monitoring-plugins:
 https://github.com/monitoring-plugins/monitoring-plugins/commit/c08d6a429ba0e0cd3642ba2c2fe85687472ee22f
 
---- nagios-plugins-2.0.1/plugins-scripts/check_mailq.pl~       2014-04-21 14:33:35.000000000 +0300
-+++ nagios-plugins-2.0.1/plugins-scripts/check_mailq.pl        2014-04-21 14:33:37.760719061 +0300
-@@ -610,17 +610,22 @@
-               {
-                       $mailq = 'qmail';
+--- nagios-plugins-2.0.3/plugins-scripts/check_mailq.pl        2015-04-12 00:49:58.451674277 +0300
++++ nagios-plugins-2.0.1/plugins-scripts/check_mailq.pl        2015-04-12 00:49:01.892078238 +0300
+@@ -199,20 +199,20 @@
+       ## now check the queue length(s)
+       if ($msg_q == 0) {
+-              $msg = "OK: mailq is empty";
++              $msg = "OK: $mailq mailq is empty";
+               $state = $ERRORS{'OK'};
+       } else {
+               print "msg_q = $msg_q warn=$opt_w crit=$opt_c\n" if $verbose;
+       
+               # overall queue length
+               if ($msg_q < $opt_w) {
+-                      $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
++                      $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
+                       $state = $ERRORS{'OK'};
+               }elsif ($msg_q >= $opt_w  && $msg_q < $opt_c) {
+-                      $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
++                      $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
+                       $state = $ERRORS{'WARNING'};
+               }else {
+-                      $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
++                      $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
+                       $state = $ERRORS{'CRITICAL'};
                }
--              elsif (-d '/var/lib/postfix' || -d '/var/local/lib/postfix'
--                     || -e '/usr/sbin/postfix' || -e '/usr/local/sbin/postfix')
+@@ -344,20 +344,20 @@
+         # check queue length(s)
+         if ($msg_q == 0){
+-                $msg = "OK: mailq reports queue is empty";
++                $msg = "OK: $mailq mailq reports queue is empty";
+                 $state = $ERRORS{'OK'};
+         } else {
+                 print "msg_q = $msg_q warn=$opt_w crit=$opt_c\n" if $verbose;
+                 # overall queue length
+                 if ($msg_q < $opt_w) {
+-                        $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
++                        $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
+                         $state = $ERRORS{'OK'};
+                 }elsif  ($msg_q >= $opt_w  && $msg_q < $opt_c) {
+-                        $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
++                        $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
+                         $state = $ERRORS{'WARNING'};
+                 }else {
+-                        $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
++                        $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
+                         $state = $ERRORS{'CRITICAL'};
+                 }
+@@ -431,13 +431,13 @@
+               
+               # overall queue length
+               if ($msg_q < $opt_w) {
+-                      $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
++                      $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
+                       $state = $ERRORS{'OK'};
+               }elsif ($msg_q >= $opt_w  && $msg_q < $opt_c) {
+-                      $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
++                      $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
+                       $state = $ERRORS{'WARNING'};
+               }else {
+-                      $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
++                      $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
+                       $state = $ERRORS{'CRITICAL'};
+               }
+@@ -489,13 +489,13 @@
+               exit $ERRORS{CRITICAL};
+       }
+       if ($msg_q < $opt_w) {
+-              $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
++              $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
+               $state = $ERRORS{'OK'};
+       }elsif ($msg_q >= $opt_w  && $msg_q < $opt_c) {
+-              $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
++              $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
+               $state = $ERRORS{'WARNING'};
+       }else {
+-              $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
++              $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
+               $state = $ERRORS{'CRITICAL'};
+       }
+ } # end of ($mailq eq "exim")
+@@ -526,13 +526,13 @@
+       }
+       close(MAILQ) ;
+       if ($msg_q < $opt_w) {
+-              $msg = "OK: mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
++              $msg = "OK: $mailq mailq ($msg_q) is below threshold ($opt_w/$opt_c)";
+               $state = $ERRORS{'OK'};
+       }elsif ($msg_q >= $opt_w  && $msg_q < $opt_c) {
+-              $msg = "WARNING: mailq is $msg_q (threshold w = $opt_w)";
++              $msg = "WARNING: $mailq mailq is $msg_q (threshold w = $opt_w)";
+               $state = $ERRORS{'WARNING'};
+       }else {
+-              $msg = "CRITICAL: mailq is $msg_q (threshold c = $opt_c)";
++              $msg = "CRITICAL: $mailq mailq is $msg_q (threshold c = $opt_c)";
+               $state = $ERRORS{'CRITICAL'};
+       }
+ } # end of ($mailq eq "nullmailer")
+@@ -605,7 +605,35 @@
+                       exit $ERRORS{'UNKNOWN'};
+               }
+       }else{
+-              $mailq = 'sendmail' ;
++              if (defined $utils::PATH_TO_QMAIL_QSTAT
++                  && -x $utils::PATH_TO_QMAIL_QSTAT)
++              {
++                      $mailq = 'qmail';
++              }
 +              elsif (-d '/var/lib/postfix'
 +                      || -d '/var/local/lib/postfix'
 +                     || -e '/usr/sbin/postfix'
 +                         || -e '/usr/local/sbin/postfix')
-               {
-                       $mailq = 'postfix';
-               }
--              elsif (-d '/usr/lib/exim4' || -d '/usr/local/lib/exim4'
--                     || -e '/usr/sbin/exim' || -e '/usr/local/sbin/exim')
++              {
++                      $mailq = 'postfix';
++              }
 +              elsif (-d '/usr/lib/exim4'
 +                      || -d '/usr/local/lib/exim4'
 +                     || -e '/usr/sbin/exim'
 +                         || -e '/usr/local/sbin/exim')
-               {
-                       $mailq = 'exim';
-               }
--              elsif (-d '/usr/lib/nullmailer' || -d '/usr/local/lib/nullmailer'
++              {
++                      $mailq = 'exim';
++              }
 +              elsif (-d '/usr/lib/nullmailer'
 +                      || -d '/usr/local/lib/nullmailer'
-                      || -e '/usr/sbin/nullmailer-send'
-                      || -e '/usr/local/sbin/nullmailer-send')
-               {
++                     || -e '/usr/sbin/nullmailer-send'
++                     || -e '/usr/local/sbin/nullmailer-send')
++              {
++                      $mailq = 'nullmailer';
++              }
++              else {
++                      $mailq = 'sendmail';
++              }
+       }
+               
+       return $ERRORS{'OK'};
+@@ -628,7 +656,7 @@
+       print "-W (--Warning)   = Min. number of messages for same domain in queue to generate warning\n";
+       print "-C (--Critical)  = Min. number of messages for same domain in queue to generate critical alert ( W < C )\n";
+       print "-t (--timeout)   = Plugin timeout in seconds (default = $utils::TIMEOUT)\n";
+-      print "-M (--mailserver) = [ sendmail | qmail | postfix | exim | nullmailer ] (default = sendmail)\n";
++      print "-M (--mailserver) = [ sendmail | qmail | postfix | exim | nullmailer ] (default = autodetect)\n";
+       print "-h (--help)\n";
+       print "-V (--version)\n";
+       print "-v (--verbose)   = debugging output\n";
+@@ -636,6 +664,8 @@
+       print "Note: -w and -c are required arguments.  -W and -C are optional.\n";
+       print " -W and -C are applied to domains listed on the queues - both FROM and TO. (sendmail)\n";
+       print " -W and -C are applied message not yet preproccessed. (qmail)\n";
++      print " This plugin tries to autodetect which mailserver you are running,\n";
++      print " you can override the autodetection with -M.\n";
+       print " This plugin uses the system mailq command (sendmail) or qmail-stat (qmail)\n";
+       print " to look at the queues. Mailq can usually only be accessed by root or \n";
+       print " a TrustedUser. You will have to set appropriate permissions for the plugin to work.\n";
index 4b35e52da453536b53c24f9bef5a02fb25c0e9f3..ee0f5d597871e7017b1e2176e674109881b194d0 100644 (file)
 Summary:       Host/service/network monitoring program plugins for Nagios
 Summary(pl.UTF-8):     Wtyczki do monitorowania hostów/usług/sieci dla Nagiosa
 Name:          nagios-plugins
-Version:       2.0.1
-Release:       2
+Version:       2.0.3
+Release:       1
 License:       GPL v3
 Group:         Networking
 Source0:       http://www.nagios-plugins.org/download/%{name}-%{version}.tar.gz
-# Source0-md5: 70daeb6d2d9ea7d41827488b80782a60
-# http://git.pld-linux.org/cgi-bin/cgit.cgi/projects/nagios-config.git/
+# Source0-md5: 6755765bab88b506181268ef7982595e
+# https://git.pld-linux.org/projects/nagios-config
 Source1:       %{name}-config-20140307.tar.bz2
 # Source1-md5: de5c205501cb89c183193d4088d48222
 Source2:       nagios-utils.php
This page took 0.745294 seconds and 4 git commands to generate.