cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Handling SNMP walk mulitiple responses as a metric for single querry

kpurimitla
Participant

Hi ,

I am working on an CUSTOM EXTENSION DEVELOPEMENT : SNMP extension for Cisco devices and running the snmpwalk command on ActiveGate. When I execute the command, I receive multiple responses for a single OID. If it were a single response, I could map it as a single metric. However, since multiple responses are returned, I would like to understand how to properly import and structure them as metrics in Dynatrace.

Could you please advise on:

  1. How to handle multiple SNMP responses for a single OID in Dynatrace?
  2. Whether each response should be mapped as a separate metric or if there's a way to structure them as dimensions?
  3. The best practices for handling such SNMP metrics in an extension.
2 REPLIES 2

yanezza
Dynatrace Mentor
Dynatrace Mentor

Hi,
in this case i will try you to handle the return values as dimensions (with eventually the use of filters) and the metric value as a count.

Yanez Diego Parolin

Hi Yanezza,

Thanks a lot for your suggestion I really appreciate your input!

You mentioned using the returned SNMP values as dimensions  and treating the metric value as a count possibly with filters.  However, after some deeper testing  I’ve run into a few limitations I’d like to share to check if you might have any alternate ideas. 

My Use Case
I’m working on a Dynatrace SNMP Extension 2.0 to collect metrics for BGP peer admin status from Cisco routers. The relevant SNMP table is:

OID for Admin Status: .1.3.6.1.2.1.15.3.1.3

OID for Peer AS Number: .1.3.6.1.2.1.15.3.1.9

When I run:

snmpwalk -v2c -c 'communitystring' 10.154.192.51 .1.3.6.1.2.1.15.3.1.3
I get multiple responses like this:

SNMPv2-SMI::mib-2.15.3.1.3.*.*.*.* = INTEGER: stop(2)
SNMPv2-SMI::mib-2.15.3.1.3.*.*.*.* = INTEGER: start(1)
So the peer IPs (like *.*.*.*) are embedded in the OID suffix/index.

Challenges
Property Walk is disabled in my environment (customer policy), so I can’t use that to auto-discover or assign dynamic dimensions.

Dynatrace SNMP Extension 2.0 doesn’t currently allow me to:

Extract the index values (e.g., IP from OID) as a dimension automatically

Assign dimensions dynamically based on SNMP response without a walk

Due to these constraints, I’m currently using a preprocessing script that:

Runs a manual walk

Extracts peer IPs from OIDs and matches them with their status

Generates static YAML metric entries for each peer with dimensions like peer_ip and asn

This works, but it’s static per device and doesn’t scale well.

My Ask
Given these limitations, do you think there’s any workaround within Extension 2.0 that could help simulate what you suggested? Maybe something creative with custom mapping or using the OID suffix as part of the key?

I’d love to hear your thoughts or any tricks you might have up your sleeve!

Thanks again for your time and input 🙏

Best regards,
Kranthi

Featured Posts