Open svestenik opened 2 years ago
Hi, we discussed this on Slack where I gave you a solution by using the Starlark processor. So I added labels for this being a feature request, as indeed it's like this a lot in the snmp world.
Hi, we discussed this on Slack where I gave you a solution by using the Starlark processor. So I added labels for this being a feature request, as indeed it's like this a lot in the snmp world.
Exactly, and I can confirm that Starlark processor script is working for main table here, but there is still a bit of coding on the Starlark processor required for full support on all tables in this MIB.
I think that this needs to be handled by SNMP plugin in full, since coding in Starlark is not everybody's strength :).
We could make a generic starlark script that works with variables to specify what you want to convert to where..
We could make a generic starlark script that works with variables to specify what you want to convert to where..
That could work.
Hi team, I am looking for a way for Telegraf SNMP Input plugin to convert decimal index into ASCII text. Searching previous issues on this topic has not produced anything useful. Example: When I poll the device in question (Cisco router) via NetSNMP from CLI I get the following result:
snmpget -v2c -c somecommunity 123.123.123.123 MPLS-VPN-MIB::mplsVpnVrfRouteDistinguisher
output:
MPLS-VPN-MIB::mplsVpnVrfRouteDistinguisher."internet" = STRING: "65500:40104"
Where "internet" is index, represented as ASCII string of the name of Vrf and result is a route descriptor.When I use Telegraf for the same query:
I get the following:
VrfRDTable,index=8.105.110.116.101.114.110.101.116.1.3,VpnVrfRouteTarget="65500:40104"
Here, we see that index is shown as decimal representation of VRF name (8.105.110.116.101.114.110.101.116.1.3).
Cisco documentation on this states as follows:
:The mplsVpnVrfName is actually an octet string that represents the string length and the ASCII codes for each character. For example, "VPN1" is represented as "4.86.80.78.49".
This practice is widely used for SNMP OID's throught networking industry, so I think it would be beneficial to add some way of translating decimal to ASCII string.