Affected Versions monitoring-plugins 2.1.2,2.2,2.3 Affected OSes: Ubuntu 18.04.5 LTS, Debian 10
Basically the check_snmp plugin is losing the community string on the way through and replacing it with the same number of spaces. root@subview:/etc/icinga2# /usr/bin/snmpget -Le -t 10 -r 5 -m '' -v 1 [context] [authpriv] 10.23.132.51:161 .1.3.6.1.4.1.4515.1.3.1.7.0 pstree -paul 5552 check_snmp,5552 -H 10.23.132.51 -C admin -o .1.3.6.1.4.1.4515.1.3.1.7.0 -v └─snmpget,5553 -Le -t 10 -r 5 -m -v 1 -c 10.23.132.51:161 .1.3.6.1.4.1.4515.1.3.1.7.0 This is obvious when you use a long community string. root@prod-icinga:~# /usr/lib/nagios/plugins/check_snmp -H 10.23.132.51 -C obviously_long_community_string -o .1.3.6.1.4.1.4515.1.3.1.7.0 -v & [1] 432 root@prod-icinga:~# /usr/bin/snmpget -Le -t 10 -r 5 -m '' -v 1 [context] [authpriv] 10.23.132.51:161 .1.3.6.1.4.1.4515.1.3.1.7.0 pstree -paul 432 check_snmp,432 -H 10.23.132.51 -C obviously_long_community_string -o .1.3.6.1.4.1.4515.1.3.1.7.0 -v └─snmpget,433 -Le -t 10 -r 5 -m -v 1 -c 10.23.132.51:161 .1.3.6.1.4.1.4515.1.3.1.7.0 root@prod-icinga:~# Expected behaviour would be an snmpget command line including the community string, which would return the expected result. Current behaviour is that: - snmpget outputs the help message on stderr (after complaining about MIBs) - check_snmp times out after about a minute Is anyone using check_snmp successfully ? which versions? cheers, Woody