pimvanpelt / vpp-snmp-agent

SNMP Agentx for VPP interface statistics
BSD 2-Clause "Simplified" License
23 stars 11 forks source link

Stats if/names returns None #11

Closed fornacis-202 closed 1 year ago

fornacis-202 commented 1 year ago

Hello. I recieve None when I run self.vppstat["/if/names"] in vpp-snmp-agent on VPP v21. However, it runs without error on VPP v23.

look at the code below:

stat = VPPStats()
stat.connect()
print('version ', stat.version)
print('epoch ', stat.epoch) 
print('/if/names', stat['/if/names'])
print('/if/rx[1].packets', stat['/if/rx'][:, 1].sum_packets())
print('/if/rx[1].octets', stat['/if/rx'][:, 1].sum_octets())
print('/if/tx[1].packets', stat['/if/tx'][:, 1].sum_packets())
print('/if/tx[1].octets', stat['/if/tx'][:, 1].sum_octets())
print("") 

output:

version  2
epoch  4645
/if/names None
/if/rx[1].packets 12948
/if/rx[1].octets 2359788
/if/tx[1].packets 27415
/if/tx[1].octets 2133494

Would you please help me with that?

pimvanpelt commented 1 year ago

First - the support section in README explains that this repository does not offer enduser support.

This AgentX repo follows VPP at its current production release (eg 23.06 for the moment). Old versions are not supported, as sometimes VPP upstream has made backwards incompatible changes, as was the case with the vppstats.py in commit https://github.com/pimvanpelt/vpp-snmp-agent/commit/c9233749bcd8674038c94308aa726da5acf6a223

If you need older VPP versions to be supported, either roll back this repo to the release date of that VPP version, back-integrate the vppstats.py module from that VPP version, or contact IPng Networks for support on commission.