# SNMP Extension 2.0 Regex OID

**URL:** <https://community.dynatrace.com/t/snmp-extension-2-0-regex-oid/45339>\
**Category:** Extensions\
**Tags:** regex, snmp, extensions\
**Created:** [April 29, 2024, 1:33pm UTC](https://community.dynatrace.com/t/snmp-extension-2-0-regex-oid/45339 "2024-04-29T13:33:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![NicoloB](https://avatars.discourse-cdn.com/v4/letter/n/e9a140/32.png) [@NicoloB](https://community.dynatrace.com/u/NicoloB)\
**Post date:** [April 29, 2024, 1:33pm UTC](https://community.dynatrace.com/t/snmp-extension-2-0-regex-oid/45339/1 "2024-04-29T13:33:47Z")

</div>

Hi,

I have a list of devices that end with the oid :

Es.

2606.7.4.1.2.1.3.1&nbsp; = Device12606.7.4.1.2.1.3.2 = Device22606.7.4.1.2.1.3.3 = Device3

the last number of oid is the index of the device. (colored red)

I need the corresponding value, but on other table doesn’t end with the same index

Es.

2606.7.4.2.2.1.4.1.2 = INTEGER: 10

2606.7.4.2.2.1.4.2.2 = INTEGER: 20

2606.7.4.2.2.1.4.3.2&nbsp;= INTEGER: 30

Is possible to custom the oid with a regex or someting like that ?

```markup
dimensions:
  - key: custom.snmp.test.device
	value: oid:2606.7.4.1.2.1.3
metrics:
  - key: custom.snmp.test.value
	value: oid:2606.7.4.2.2.1.4.{custom.snmp.test.device}.2​

```

I hope I have explained myselfI appreciate any advice, I’ve been struggling with it for daysThank you

---

<div class="post-metadata">

**Author:** ![Mike\_L](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/mike_l/32/11717_2.png) [@Mike\_L](https://community.dynatrace.com/u/Mike_L)\
**Post date:** [April 30, 2024, 11:29am UTC](https://community.dynatrace.com/t/snmp-extension-2-0-regex-oid/45339/2 "2024-04-30T11:29:56Z")

</div>

The only way this’d be possible was if the values were in an SNMP table, so you’d go table: true in the subgroup to poll the columns of a table. If it’s not a table, there is currently no way of doing that dynamically. You’d have to hardcode it into the YAML.

---

<div class="post-metadata">

**Author:** ![NicoloB](https://avatars.discourse-cdn.com/v4/letter/n/e9a140/32.png) [@NicoloB](https://community.dynatrace.com/u/NicoloB)\
**Post date:** [May 2, 2024, 8:22am UTC](https://community.dynatrace.com/t/snmp-extension-2-0-regex-oid/45339/3 "2024-05-02T08:22:59Z")

</div>

Unfortunately, it’s as I thought.

I was hoping there was a more dynamic way.

Thanks for support

---

<div class="post-metadata">

**Author:** ![kpurimitla](https://avatars.discourse-cdn.com/v4/letter/k/ecccb3/32.png) [@kpurimitla](https://community.dynatrace.com/u/kpurimitla)\
**Post date:** [April 21, 2025, 6:22pm UTC](https://community.dynatrace.com/t/snmp-extension-2-0-regex-oid/45339/4 "2025-04-21T18:22:29Z")

</div>

Hi , Did you find any solution?
