SNMP Question / Advice needed

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Moderators, Developers

Post Reply
Author
Message
ChrisAT
Posts: 8
Joined: Sat Sep 29, 2018 6:00 am

SNMP Question / Advice needed

#1 Post by ChrisAT » Sun May 12, 2019 11:36 am

Hi All - while I did try to find helpful information I didn't succeed - so creating a new post, hoping I didnt miss anything...

My current situation is as follows:

I am running Cacti V0.8.8h on a Raspberry Pi, to graph (besides quite some other devices) the WAN traffic of a Cisco RV325 Router with 2 WAN lines.

Until (and including) Firmware 1.0.01.20 I was able to get the WAN counters by 4 distinct SNMP queries.
(To be complete here the OID's:
WAN1 rx bytes: .1.3.6.1.2.1.31.1.1.1.6.17
WAN1 tx bytes: .1.3.6.1.2.1.31.1.1.1.10.17
WAN2 rx bytes: .1.3.6.1.2.1.31.1.1.1.6.18
WAN2 tx bytes: .1.3.6.1.2.1.31.1.1.1.10.18
The interface names can be fetched by querying .1.3.6.1.2.1.31.1.1.1.1 - something that I didn't have to use in Cacti though)

This really worked like a charm, no issue at all.


With newer Firmware (1.0.02.16 & 1.0.03.15) OID's changed (which per se of course wouldn't be an issue).
(Again to be complete here the OID's:
WAN1 rx bytes: .1.3.6.1.2.1.31.1.1.1.6.42
WAN1 tx bytes: .1.3.6.1.2.1.31.1.1.1.10.42
WAN2 rx bytes: .1.3.6.1.2.1.31.1.1.1.6.43
WAN2 tx bytes: .1.3.6.1.2.1.31.1.1.1.10.43
The interface names can still be fetched by querying .1.3.6.1.2.1.31.1.1.1.1 )

The problem I am now facingthough is, that querying the single OID's do not return updated values (despite I know there is traffic) - the values look like being static.
(Please see SNMP_Single_Value.JPG)

What is interesting though is, that if I query for eg all Interfaces inbound traffic (so eg for .1.3.6.1.2.1.31.1.1.1.6) I get a list where the counters for the single interfaces are being updated.
(Please see SNMP_List.JPG)

Questions to more experienced ones would now be:

1.) Is the behavior of single/distinct Interface OID counters not being updated properly something that has to be expected or would that rather have to be considered being a bug (So up to Cisco to fix)?

2.) Given though this is expected behavior, I understand I somehow have to process the complete list of interfaces.
While I did find some information around indexed SNMP I have to admit I didn't come to grips with this at all.
Would anybody please be able and so kind to help to get that to work then?

Thanks a lot for your help!

Chris
Attachments
SNMP_Single_Value.JPG
SNMP_Single_Value.JPG (33.01 KiB) Viewed 344 times
SNMP_List.JPG
SNMP_List.JPG (47.53 KiB) Viewed 344 times

netniV
Cacti Guru User
Posts: 2808
Joined: Sun Aug 27, 2017 12:05 am

Re: SNMP Question / Advice needed

#2 Post by netniV » Fri May 17, 2019 4:14 pm

Generally speaking, the last digits are normally the index. For different OIDs they will all end with the same index so if the OID for the table of names is .1.2.3.4 then .1.2.3.4.x will be an individual name. The max speed table may be .1.2.4.6, so index 41 probably has a name (.1.2.3.4.41), a max speed (.1.2.4.6.41) and probably a current value (.1.3.2.7.0.4.15.41)

Although my example OIDs are randomly made up, thats pretty much what happens with vendor OIDs. You need to find the correct OID/MIB for your vendor/device to work out what maps to where.

ChrisAT
Posts: 8
Joined: Sat Sep 29, 2018 6:00 am

Re: SNMP Question / Advice needed

#3 Post by ChrisAT » Sat May 18, 2019 2:40 am

Thanks a lot for your reply!

I have to admit though that I am not sure if I understand the logic with your example OID's (table having .1.2.4.6 and subsequent table values not starting with .1.2.4.6) - but maybe that's not really relevant anyway as you point out that your OID's are just randomly made up.

What I think might be critical though is the following:

Can I expect to get updated and accurate values if I query the OID for a single current value (so in your example .1.3.2.7.0.4.15.41)?

Or is it common as well that the whole table (in your example .1.2.4.6) needs to be fetched to get updated values on the single OID's the table consists of?

Thanks a lot!

netniV
Cacti Guru User
Posts: 2808
Joined: Sun Aug 27, 2017 12:05 am

Re: SNMP Question / Advice needed

#4 Post by netniV » Sat May 18, 2019 4:42 am

That all depends on the firmware / software providing the snmp values. If you manually query and find it isn't updating, only the vendor can normally correct that (unless there's a software based setting). You should lookup the OIDs in question against the vendor's MIB as that may tell you if its only updated one every 15 mins or some other interval.

The hierarchy of OIDs can mean you have what appears to be vastly different numbering to get all the data you want. Each number in the chain represents something with the first few used to identify internal standards body, then vendor and after that its the structure the vendor wishs to use. They often have a mix between using a standard MIB and thier own.

http://oidref.com/

That is a website i use a lot for looking up OIDs and seeing what the data is supposed to represent.

ChrisAT
Posts: 8
Joined: Sat Sep 29, 2018 6:00 am

Re: SNMP Question / Advice needed

#5 Post by ChrisAT » Sat May 18, 2019 6:26 am

Thanks for pointing me to http://oidref.com/

I did take a look at http://oidref.com/1.3.6.1.2.1.31.1.1.1.6 as suggested and understand that ifHCInOctets should actually very much be a standard counter.
(.iso.org.dod.internet.mgmt.mib-2.ifMIB.ifMIBObjects.ifXTable.ifXEntry.ifHCInOctets)

I also couldn't find any hint whatsoever indicating that it's only updated at some specific interval.

Furthermore Cisco's documentation / the MIB files didn't change with the new firmware either (and is in sync with oidref.com) - so I would understand what worked with the old firmware should work as well with the new one.

Besides - like you mentioned - I manually query the respective OID and find it isn't updated.

So as conclusion I would understand it's likely a flaw in the firmware and the vendor should take care of this and fix it - would you agree?



Thanks a lot again for your highly valued help and sorry if I seem to be a bit clumsy - I'm just not sure anymore if I can trust my own understanding (despite it worked well for the last years)...

Chris

netniV
Cacti Guru User
Posts: 2808
Joined: Sun Aug 27, 2017 12:05 am

Re: SNMP Question / Advice needed

#6 Post by netniV » Sun May 19, 2019 1:51 am

Things change, memory gets rusty, and a little healthy doubt all add to the experiences that give us knowledge :)

Post Reply