[Pkg-nagios-devel] Bug#876874: revise check_snmp_* commands argument order

Matus UHLAR - fantomas uhlar at fantomas.sk
Tue Sep 26 14:36:18 UTC 2017


Package: nagios-snmp-plugins
Version: 1.1.1-11

Hello,

the configured checks in snmp_load.cfg, snmp_mem.cfg, snmp_process.cfg and
snmp_storage.cfg use snmp community in argument 5, while argument 4 is
often unused.

This means that a user is in fact required to provide argument 4 even if
it's empty.

in check_snmp_mem* even the ARG1 can be skipped (and could in
check_snmp_load* if the -T was skiped) - both have usable defaults.

I recommend changing default configs to use $ARG1$ as snmp community in v1
and v2 checks (v3 checks use $USER9$ which should be acceptable).
The ARG4 (or ARG5) can be used for extra arguments

The README.Debian documents using "$USER7$=-C <community>" but this is never
used in the proposed configs.

I am attaching patch that changes to this behaviour.
Resulting checks look like:

check_snmp_process_v1!community!process!warning!critical

# for linux servers use "memory,swap"
# for cisco append !-I
check_snmp_mem_v1!community!warning!critical

# for linux use "1,5,15" values and append !-T netsl
check_snmp_load_v1!community!warning!critical

check_snmp_storage_v1!community!path!warning!critical


v2 checks have the same argument, v3 checks avoid community and expect SNMP
authentication in USER9 variable.


-- 
Matus UHLAR - fantomas, uhlar at fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
There's a long-standing bug relating to the x86 architecture that
allows you to install Windows.   -- Matthew D. Fuller
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios-snmp-plugins.patch
Type: text/x-diff
Size: 4714 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-nagios-devel/attachments/20170926/351d8122/attachment.patch>


More information about the Pkg-nagios-devel mailing list