sonic-net / sonic-snmpagent

A net-snmpd agentx subagent for SONiC
Other
15 stars 113 forks source link

[action] [PR:303] Fix SNMP dropping some of the queue counter when create_only_config_db_buffers is set to true (#303) #309

Closed mssonicbld closed 9 months ago

mssonicbld commented 9 months ago

This happened because the MIB assumed that half the queues configured are for mcast. When create_only_config_db_buffers is set to true this is not the case

- What I did The ciscoSwitchQosMIB MIB assumed that all the counter are configured and that half of the configured queues are for mcast. This is no longer true, the feature "polling only configured ports buffer queue" make it possible for port to not have MC counters. This wrong assumption caused issue https://github.com/sonic-net/sonic-buildimage/issues/17448

To fix this, I instead used the BUFFER_MAX_PARAM_TABLE to find the max possible queues - How I did it

- How to verify it Inside the SNMP docker run snmp walk: $ snmpwalk -v2c -c msft 10.64.247.240 1.3.6.1.4.1.9.9.580.1.5.5.1.4.1 Check that the results is not missing counters from any queue

mssonicbld commented 9 months ago

Original PR: https://github.com/sonic-net/sonic-snmpagent/pull/303