Package: nagios-plugins
Source: nagios-plugins
Version: 1.4.15
Tags: patch

contrib script check_snmp_disk_monitor.pl ignores valid warning and
critical levels supplied via arguments -w, -c, --warning or
--critical. Bug appears to be related to coding error. I attempted to
contact the listed author but received a mailhost error.
I have filed this against the source package because none of the
binary packages list this file as installed. If it would be more
appropriate for me to file upstream, let me know.

diff attached.
--- a/check_snmp_disk_monitor.pl	2012-01-31 11:29:32.245100186 -0500
+++ b/check_snmp_disk_monitor.pl	2012-01-31 11:30:12.049098816 -0500
@@ -27,7 +27,6 @@
 %mounts        = ();
 
 sub process_options {
-    my( $opt_crit, $opt_warn ) = ();
     Getopt::Long::Configure( 'bundling' );
     GetOptions(
         'V'     => \$opt_version,       'version'     => \$opt_version,
@@ -37,8 +36,8 @@
         'H:s'   => \$opt_host,          'hostname:s'  => \$opt_host,
         'p:i'   => \$opt_port,          'port:i'      => \$opt_port,
         'C:s'   => \$opt_community,     'community:s' => \$opt_community,
-        'c:i'   => \$opt_crit,          'critical:i'  => \$opt_crit,
-        'w:i'   => \$opt_warn,          'warning:i'   => \$opt_warn,
+        'c:i'   => \$opt_critical,      'critical:i'  => \$opt_critical,
+        'w:i'   => \$opt_warning,       'warning:i'   => \$opt_warning,
         't:i'   => \$TIMEOUT,           'timeout:i'   => \$TIMEOUT,    
         'm:s'   => \$opt_mountpoint,    'mountpoint:s'=> \$opt_mountpoint
     );

Reply via email to