• 0
Matt Ham

Ignore trailing part of oid

Question

Hello all,

I have a slight problem I'll try to explain as best I can.  In a nutshell I want to plot latency among our router's system-ip (think loopback)

I have an OID that begins: "1.3.6.1.4.1.41916.9.2.1.6.4.64.68.161.220.4" doing a walk on that will give values of our routers system-ip (2.21.184.1) . example: 

$ !snmpwalk [redacted] 1.3.6.1.4.1.41916.9.2.1.6.4.64.68.161.220.4
Walking OID 1.3.6.1.4.1.41916.9.2.1.6.4.64.68.161.220.4 from [redacted]:161 for version v3 with securityName=[redacted] authProto=MD5 authToken=***(10) privProto=AES privToken=***(10) pdu.timeout=5s walk.timeout=5s
	107.199.135.25.2.12426.12386 => 2.21.184.2
	107.199.135.25.2.12426.62520 => 2.21.184.1

The OID for latency begins with "1.3.6.1.4.1.41916.9.2.1.10.4.10.0.41.2.4" doing a walk on that gives correct values for latency. example: 

 !snmpwalk [redacted] 1.3.6.1.4.1.41916.9.2.1.10.4.10.0.41.2.4.
Walking OID 1.3.6.1.4.1.41916.9.2.1.10 from [redacted]:161 for version v3 with securityName=[redacted] authProto=MD5 authToken=***(10) privProto=AES privToken=***(10) pdu.timeout=5s walk.timeout=5s
	107.199.135.25.2.12386.12386 => 83
	107.199.135.25.2.12386.62520 => 82

 

If we compare the outputs we see where the problem comes in:

107.199.135.25.2.12426.12386 => 2.21.184.2
107.199.135.25.2.12386.12386 => 83


The 2nd to last group (sometimes the last 3), do not match so OID.##wildvalue## will not work.  12426 != 12386

What I need is a way to have ##wildvalue##.<ignore this> since the 107.199.135.25 part will always match, and the last 3 groups could change.

Currently I have the datasource's SNMP OID parameter set to 1.3.6.1.4.1.41916.9.2.1.6.4.64.68.161.220.4..  this gives the correct instance data and breaks it out by system-ip.  But like i mentioned the ##wildvalue## does not work when trying to add 1.3.6.1.4.1.41916.9.2.1.10.4.10.0.41.2.4. as the datapoint to plot because of the different trailer oid sections.

Has anyone needed to do this before? If so, how was it done?

Share this post


Link to post
Share on other sites

2 answers to this question

Recommended Posts

  • 0

I'm not sure if I follow but I don't see how you can setup an ignore since LM SNMP Datapoints just use GET requests only (afaik) which means it needs to know the exact OID to use. So if I understand correctly, can you do this? Setup Active Discovery to use 1.3.6.1.4.1.41916.9.2.1.6.4.64.68.161.220.4.107.199.135.25.2.12426 using wildcard discovery. That will get you wildvalues of 12386, 62520, etc. Then have a DataPoint using a OID of 1.3.6.1.4.1.41916.9.2.1.10.4.10.0.41.2.4.107.199.135.25.2.12386.##WILDVALUE## ?

The fact that the base ActiveDiscovery OID and the DataPoint OIDs are different are normal, or are you saying that the OID for Latency can have all sorts of different groups of numbers instead of just the last number changing? So that you need a wildvalue of more then just the last number? I might be misunderstanding since I've never seen OIDs that long before.

Also at worse you can use scripting to do SNMP (see https://www.logicmonitor.com/support/terminology-syntax/scripting-support/access-snmp-from-groovy/ ) and make the wildvalue or the check itself whatever is needed, including using Walks.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.