I’m using snmp input plugin on telegraf to fetch data from my network devices, for a particular vendor and using vendor specific MIB, there are certain fields that are returning encoded values example :-
“ENCODED VALUE FROM TELEGRAF with --test”
outletDeviceCapabilities=“▒”
The snmp device is returning a series of bits indicating which capabilities are enabled. Telegraf does not know about that and interprets them as string characters, hence why you are receiving an unprintable character as it isn’t matching any UTF8 characters.
So a possible solution if you really want to gather this info with telegraf is to use bitwise operators to extract the individual bits…
Gahh!! After 2 days of research,brainstorming getting support from @Hipska and trying to use bindata, content_encoding, processors.enum/processors.enum.mapping and what not…
Finally got it working… the solution is present in the snmp plugin itself!
For upcoming users… If you face the same issue for BITS fields just add
conversion = "enum(1)"
Under the BITS type field, it will just directly fetch the mappings from MIB itself,
A small prerequisite would be to enable snmp_translator = "gosmi"