snmp bug (?)

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
svaertis23
Posts: 3
Joined: Fri Oct 04, 2024 3:27 am

snmp bug (?)

Post by svaertis23 »

I'm connecting to various codecs to get the packet drops information via snmp,
While it works fine with some of them, Nagios seems to be adding "c" to some of them

That "C" is not in data but it breaks the graphs:

[nagios@xx.com ~]$ /usr/local/nagios/libexec/check_snmp -H xx.xx.xx.xx -o 'iptecPortRxPacketErrors.1' -C 'xxx' -P 2c -m IPTEC-SERVICES-VNP-MIB -v
/bin/snmpget -Le -t 3 -r 5 -m IPTEC-SERVICES-VNP-MIB -v 2c [context] [authpriv] xx.xx.xx.xx:161 iptecPortRxPacketErrors.1
IPTEC-PORTSERVICE-COMMON-MIB::iptecPortRxPacketErrors.1 = Counter32: 323
SNMP OK - 323 | IPTEC-PORTSERVICE-COMMON-MIB::iptecPortRxPacketErrors.1=323c

cneck_snmp -v2.4.5

Where is that "c" from and how can I get rid of it?
DoubleDoubleA
Posts: 199
Joined: Thu Feb 09, 2017 5:07 pm

Re: snmp bug (?)

Post by DoubleDoubleA »

Hi @svaertis23,

This may be a usage issue, and not a bug. There are two pieces of documentation I would point you to:

https://nagios-plugins.org/doc/guidelines.html

https://nagios-plugins.org/doc/man/check_snmp.html

If you look in the guidelines doc, you will see under Performance data, Notes:, 10.5, that the letter "c" denotes "a continous counter (such as bytes transmitted on an interface)".

If you then look at check_snmp under Rate Calculation at the bottom that you may want to be using the --rate option.

Your command you posted uses the -r option, which the help says is for REGEX.

If you meant to check for a rate of 5, you would want to use --rate rather than -r.

Let me know how that works for you.

Aaron
svaertis23
Posts: 3
Joined: Fri Oct 04, 2024 3:27 am

Re: snmp bug (?)

Post by svaertis23 »

Thank you but if I do this, this breaks the counter, now it just says:

SNMP RATE OK - 0

where it should return actual number of dropped packets:

SNMP OK - 269

Please advise,

Cheers
svaertis23
Posts: 3
Joined: Fri Oct 04, 2024 3:27 am

Re: snmp bug (?)

Post by svaertis23 »

DoubleDoubleA
Posts: 199
Joined: Thu Feb 09, 2017 5:07 pm

Re: snmp bug (?)

Post by DoubleDoubleA »

Awesome, thanks for letting me know!