I assume you are using the snmptranslate to convert your input from OID to MIB format? If so, The snmptranslate does parse the entire MIB file every time which takes time depending on the size of your MIB file and this cannot be avoided. The problem is compounded when you have more than one MIB files. So I would suggest, since Telegraf is your own code use the pre-compiled config of these MIBS.
What I mean is, do snmptranslate to get MIB to OID mapping using the command below (try different options yourself): /usr/bin/snmptranslate -Tso -m <mib-file> The output you get here will contain the 1-1 mapping of all OIDs and Text form inside the MIB file. You can store this output in some file or table. Now you can just load this table in-memory which is having a pre-compiled data of snmptranslate into your Telegraf code. Write a function in ur code that will use this mapping to do the translation you need (OID to MIB or reverse as per need). This would be a recursive function. By this you avoid calling snmptranslate function everytime. Your own recursive function will be far faster to produce the output you need. Regards, Kalim On Apr 12, 2019, at 8:55 AM, Paulo Henrique Peres <dob...@gmail.com<mailto:dob...@gmail.com>> wrote: Hi... Hello, I'm using a program called Telegraf, this program has an SNMP input plugin for collecting information, I can pass as a table parameter. On my operating system I have loaded MIB files from an equipment vendor I work with and configure Telegraf to use a table of one of those files. The Telegraf uses some net-snmp commands like for example the snmptranslate for each OID of the table when it is configured, finally what is the problem that I am facing, when the size of my MIB file is large the response time of snmptranslate is much larger than smaller files. I wonder if this behavior is expected, and if yes it would be possible to do something to improve the response time. -- Paulo Henrique Peres _______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net<mailto:Net-snmp-users@lists.sourceforge.net> Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users
_______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users