[Pkg-nagios-devel] Bug#894601: check_raid fails to ignore listed devices

Damyan Ivanov dmn at debian.org
Mon Apr 2 06:36:47 UTC 2018

Package: nagios-plugins-contrib
Version: 21.20170222
Severity: normal
Tags: upstream patch

check_raid is supposed to ignore any devices listed on the command line:

  Usage: check_raid [-h] [-V] [-S] [list of devices to ignore]

However, the chech whether a given device should be ignores is:

  # return true if parameter is not in ignore list
  sub valid {
        my $this = shift;
        my ($v) = lc $_[0];

        foreach (@utils::ignore) {
                warn "   $v is $_?";
                return 0 if lc $_ eq $v;
        warn "$v is a valid device";
        return 1;

But @utils:ignore is not populated anywhere. The code that handles the command 
line is:

  if (@ARGV) {
        @App::Monitoring::Plugin::CheckRaid::Utils::ignore = @ARGV;

Changing the loop in valid() to use 
@App::Monitoring::Plugin::CheckRaid::Utils::ignore instead of @utils::ignore 
fixes it and ignoring devices listed on the command line works again.

Thanks for considering,

-- System Information:
Debian Release: buster/sid
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.15.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=bg_BG.UTF-8, LC_CTYPE=bg_BG.UTF-8 (charmap=UTF-8), LANGUAGE=bg_BG.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

nagios-plugins-contrib depends on no packages.

Versions of packages nagios-plugins-contrib recommends:
ii  bind9-host                                         1:9.11.3+dfsg-1
ii  binutils                                           2.30-9
ii  freeipmi-tools                                     1.5.7-2
ii  ldap-utils                                         2.4.45+dfsg-1
ii  libc6                                              2.27-3
pn  libdata-validate-domain-perl                       <none>
pn  libdata-validate-ip-perl                           <none>
ii  libdate-manip-perl                                 6.70-1
ii  libdbd-mysql-perl                                  4.046-1
ii  libio-socket-ssl-perl                              2.056-1
ii  libipc-run-perl                                    0.97-1
ii  liblocale-gettext-perl                             1.07-3+b3
pn  liblwp-useragent-determined-perl                   <none>
ii  libmail-imapclient-perl                            3.39-1
ii  libmemcached11                                     1.0.18-4.2
pn  libmemcachedutil2                                  <none>
pn  libmonitoring-plugin-perl | libnagios-plugin-perl  <none>
pn  libnagios-plugin-perl                              <none>
pn  libnet-cups-perl                                   <none>
ii  libnet-dns-perl                                    1.10-2
pn  libnet-dns-sec-perl                                <none>
ii  libnet-smtp-ssl-perl                               1.04-1
pn  libnet-smtp-tls-perl                               <none>
pn  libnet-smtpauth-perl                               <none>
ii  libnet-snmp-perl                                   6.0.1-3
ii  libnet-ssleay-perl                                 1.85-1
ii  libreadonly-perl                                   2.050-1
pn  libredis-perl                                      <none>
ii  libsocket-perl                                     2.027-1
ii  libtimedate-perl                                   2.3000-2
pn  libvarnishapi1                                     <none>
pn  libwebinject-perl                                  <none>
ii  libxml-simple-perl                                 2.25-1
ii  libyaml-syck-perl                                  1.29-1+b3
ii  lsof                                               4.89+dfsg-0.1
pn  nagios-plugins-basic                               <none>
ii  openssl                                            1.1.0h-2
ii  perl                                               5.26.1-5
ii  perl-base [libsocket-perl]                         5.26.1-5
ii  procps                                             2:3.3.12-4
ii  python                                             2.7.14-4
pn  python-pymongo                                     <none>
ii  ruby                                               1:2.5.1
pn  snmp                                               <none>
ii  whois                                              5.3.0

Versions of packages nagios-plugins-contrib suggests:
pn  backuppc                   <none>
pn  cciss-vol-status           <none>
pn  expect                     <none>
pn  libsys-virt-perl           <none>
ii  moreutils                  0.60-1
pn  mpt-status                 <none>
pn  nagios-plugin-check-multi  <none>
pn  percona-toolkit            <none>
ii  perl-doc                   5.26.1-5
ii  python2.7                  2.7.14-7
pn  smstools                   <none>

More information about the Pkg-nagios-devel mailing list