Bug 2271675

Summary: Nagios check_snmp no longer works correctly when -w or -c specified
Product: [Fedora] Fedora EPEL Reporter: Michael Bauer <mjbauer>
Component: nagios-pluginsAssignee: Guido Aulisi <guido.aulisi>
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: epel7CC: guido.aulisi, igor.raits, lemenkov, rs, smooge
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Michael Bauer 2024-03-26 21:24:42 UTC
Description of problem:

Using check_snmp with -w or -c flags of any sort, now consistently produces "No valid data returned (3)" instead of the expected output.


Version-Release number of selected component (if applicable):

nagios-plugins-snmp-2.4.8-2.el7.x86_64


How reproducible:

Every time


Steps to Reproduce:
1. /usr/lib64/nagios/plugins/check_snmp -H [hostname] -o [OID] -C [community_string] -w 3:3
2. Read bogus "No valid data returned (3)"
3. Swear copiously.


Actual results:

% ./check_snmp -H idrac -o .1.3.6.1.4.1.674.10892.5.4.200.10.1.15.1 -C s00per-sekrit-community-string -w 3:3
No valid data returned (3)


Expected results:

% ./check_snmp -H idrac -o .1.3.6.1.4.1.674.10892.5.4.200.10.1.15.1 -C s00per-sekrit-community-string -w 3:3
SNMP OK - 3 | iso.3.6.1.4.1.674.10892.5.4.200.10.1.15.1=3 


Additional info:

If I run check_snmp without a -w or -c flag, it works as expected -- but I want the warnings or criticals if the SNMP values deviate from 'ok(3)'.

% ./check_snmp -H idrac -o .1.3.6.1.4.1.674.10892.5.4.200.10.1.15.1 -C s00per-sekrit-community-string
SNMP OK - 3 | iso.3.6.1.4.1.674.10892.5.4.200.10.1.15.1=3 

snmpget produces the correct expected value, when run from the same host, so this is not an SNMP issue on the other end:

% snmpget -m ALL -v 1 -c s00per-sekrit-community-string idrac
.1.3.6.1.4.1.674.10892.5.4.200.10.1.15.1
IDRAC-MIB::systemStateAmperageStatusCombined.1 = INTEGER: ok(3)

This worked yesterday, before the version of nagios-plugins-snmp updated to 2.4.8-2.  It had been working for years -- there has been no recent change to our Nagios configuration.  Unfortunately, because of how EPEL works, I can't downgrade: the old version of the package is gone.

Comment 1 Robert Story 2024-03-26 21:46:56 UTC
dup of #2270342