check_snmp Reporting Warning or Critical Incorrectly

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
ingrami
Posts: 1
Joined: Thu Apr 30, 2020 5:53 am

check_snmp Reporting Warning or Critical Incorrectly

Post by ingrami »

Hi.

I am using the below check to verify the free SWAP on a RHEL8 host.

./check_snmp -o .1.3.6.1.4.1.2021.4.4.0 -H hostname -C community
SNMP OK - 1679356 | iso.3.6.1.4.1.2021.4.4.0=1679356

This reports correctly.
But as soon as I add a warning or critical argument the Status report incorrectly although the free swap has not changed.

./check_snmp -o .1.3.6.1.4.1.2021.4.4.0 -H hostname -C community-w 1300000 -c 1000000
SNMP CRITICAL - *1679356* | iso.3.6.1.4.1.2021.4.4.0=1679356;1300000;1000000

If the values are increased to higher than the free swap the status reports OK.

./check_snmp -o .1.3.6.1.4.1.2021.4.4.0 -H hostname -C community -w 2300000 -c 3000000
SNMP OK - 1679356 | iso.3.6.1.4.1.2021.4.4.0=1679356;2300000;3000000

This is the same for when checking the Total Free Memory (RAM + SWAP).
./check_snmp -o .1.3.6.1.4.1.2021.4.11.0 -H hostname -C community
SNMP OK - 2865504 | iso.3.6.1.4.1.2021.4.11.0=2865504

./check_snmp -o .1.3.6.1.4.1.2021.4.11.0 -H hostname -C community -w 1679360
SNMP WARNING - *2865584* | iso.3.6.1.4.1.2021.4.11.0=2865584;1679360;

Thanks.
II
Locked