NetXMS Support Forum

English Support => General Support => Topic started by: blazarov on May 20, 2019, 03:04:26 PM

Title: Translate ASCII encoded SNMP OIDs to text
Post by: blazarov on May 20, 2019, 03:04:26 PM
Hello,
i am trying to setup a nice template for monitoring F5 load balancers and their services with instance discovery.
I stumbled upon the way they are encode their object names in SNMP OIDs. I would like to use the decoded human readable string in NetXMS DCI instead of the long encoded code. Here is an example:

root@nxagent:~/.snmp/mibs# snmpwalk -v2c -c XXXXX 192.168.120.YYY iso.3.6.1.4.1.3375.2.2.5.4.3.1.11.31.47.67.111.109.109.111.110.47.98.111.107.95.102.105.110.98.114.105.100.103.101.95.112.114.111.100.95.112.111.111.108.40.47.67.111.109.109.111.110.47.98.111.107.95.112.114.111.100.95.49.48.46.49.48.50.46.49.52.57.46.52.49.95.102.105.110.98.114.105.100.103.101.35500
iso.3.6.1.4.1.3375.2.2.5.4.3.1.11.31.47.67.111.109.109.111.110.47.98.111.107.95.102.105.110.98.114.105.100.103.101.95.112.114.111.100.95.112.111.111.108.40.47.67.111.109.109.111.110.47.98.111.107.95.112.114.111.100.95.49.48.46.49.48.50.46.49.52.57.46.52.49.95.102.105.110.98.114.105.100.103.101.35500 = Gauge32: 10

root@nxagent:~/.snmp/mibs# snmpwalk -m F5-BIGIP-LOCAL-MIB -v2c -c XXXX 192.168.120.YYY iso.3.6.1.4.1.3375.2.2.5.4.3.1.11.31.47.67.111.109.109.111.110.47.98.111.107.95.102.105.110.98.114.105.100.103.101.95.112.114.111.100.95.112.111.111.108.40.47.67.111.109.109.111.110.47.98.111.107.95.112.114.111.100.95.49.48.46.49.48.50.46.49.52.57.46.52.49.95.102.105.110.98.114.105.100.103.101.35500
F5-BIGIP-LOCAL-MIB::ltmPoolMemberStatServerCurConns."/Common/bok_finbridge_prod_pool"."/Common/bok_prod_10.102.149.41_finbridge".35500 = Gauge32: 10

root@nxagent:~/.snmp/mibs# snmptranslate -m F5-BIGIP-LOCAL-MIB iso.3.6.1.4.1.3375.2.2.5.4.3.1.11.31.47.67.111.109.109.111.110.47.98.111.107.95.102.105.110.98.114.105.100.103.101.95.112.114.111.100.95.112.111.111.108.40.47.67.111.109.109.111.110.47.98.111.107.95.112.114.111.100.95.49.48.46.49.48.50.46.49.52.57.46.52.49.95.102.105.110.98.114.105.100.103.101.35500
F5-BIGIP-LOCAL-MIB::ltmPoolMemberStatServerCurConns."/Common/bok_finbridge_prod_pool"."/Common/bok_prod_10.102.149.41_finbridge".35500

As seen above when i load the MIBs in the standard linux net-snmp tools it does it automatically, but i couldnt find a way to implement it in NetXMS DCI/Instance discovery, apart from writing the code for translation myself in the instance discovery filtering script.

Any ideas?
Title: Re: Translate ASCII encoded SNMP OIDs to text
Post by: Victor Kirhenshtein on May 21, 2019, 08:44:53 AM
Hi,

this will require changes in NetXMS SNMP code. I've added feature request for that: https://track.radensolutions.com/issue/NX-1642 (https://track.radensolutions.com/issue/NX-1642)

Best regards,
Victor
Title: Re: Translate ASCII encoded SNMP OIDs to text
Post by: blazarov on May 21, 2019, 09:24:08 AM
I think i can write the code to translate to readable text in the instance discovery filtering script, but i found that some instances are just too long even for the DCI parameter. What is the maximimum length of {instance} and the DCI parameter?
Title: Re: Translate ASCII encoded SNMP OIDs to text
Post by: Victor Kirhenshtein on May 21, 2019, 09:41:09 AM
Limits are 1023 characters for DCI parameter name and 255 characters for instance name.

Best regards,
Victor
Title: Re: Translate ASCII encoded SNMP OIDs to text
Post by: blazarov on May 21, 2019, 06:29:11 PM
Does that mean that even if in theory i write to code to translate to human readable text in instance discovery filter i will not be able to pass it back to the DCI parameter because the SNMP agent will not poll it if it is in text, and 255 characters are not enough to pass it as SNMP OID?
Title: Re: Translate ASCII encoded SNMP OIDs to text
Post by: Victor Kirhenshtein on May 21, 2019, 10:20:57 PM
Parameter itself is ok, there is 1023 character limit. Problem is with instance value where actual OID will not fit. It is fairly easy to extend instance length limit to 1023 characters as well, I can do that for next release.

Best regards,
Victor
Title: Re: Translate ASCII encoded SNMP OIDs to text
Post by: Victor Kirhenshtein on May 24, 2019, 07:39:54 PM
Update: in release 2.2.15 size limit for instance field increased to 1023 characters.

Best regards,
Victor