Bug 2271675 - Nagios check_snmp no longer works correctly when -w or -c specified
Summary: Nagios check_snmp no longer works correctly when -w or -c specified
Keywords:
Status: NEW
Alias: None
Product: Fedora EPEL
Classification: Fedora
Component: nagios-plugins
Version: epel7
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Guido Aulisi
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-03-26 21:24 UTC by Michael Bauer
Modified: 2024-03-26 21:46 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.