# Extensions 2.0 SNMP using query to change variables

**URL:** <https://community.dynatrace.com/t/extensions-2-0-snmp-using-query-to-change-variables/38633>\
**Category:** Extensions\
**Tags:** snmp, extensions\
**Created:** [February 28, 2023, 4:01pm UTC](https://community.dynatrace.com/t/extensions-2-0-snmp-using-query-to-change-variables/38633 "2023-02-28T16:01:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rdinis](https://avatars.discourse-cdn.com/v4/letter/r/e8c25b/32.png) [@rdinis](https://community.dynatrace.com/u/rdinis)\
**Post date:** [February 28, 2023, 4:01pm UTC](https://community.dynatrace.com/t/extensions-2-0-snmp-using-query-to-change-variables/38633/1 "2023-02-28T16:01:37Z")

</div>

Hi all,

Im using the SNMP extension 2.0 to collect metrics of devices in different rooms.  
Each device have a hostname -&nbsp; **sys.name** - with the id of the room and I would like to collect the device name and transform the variable to become a tag or property, but i need to remove some chars in string.

snmp:&nbsp; - group: device-group&nbsp; &nbsp; interval:&nbsp; &nbsp; &nbsp; minutes: 1&nbsp; &nbsp; dimensions:&nbsp; &nbsp; &nbsp; - key: sys.name _### ABC0123456789_&nbsp; &nbsp; &nbsp; &nbsp; value: oid:1.3.6.1.2.1.1.5.0  
&nbsp; &nbsp; &nbsp; - key: _device.room_  
&nbsp; &nbsp; &nbsp; &nbsp; _query: # device.room =&nbsp;sys.name → 1234_

I would like to know if its possible to change the string value of keys in any way possible.

---

<div class="post-metadata">

**Author:** ![ChadTurner](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/chadturner/32/161_2.png) [@ChadTurner](https://community.dynatrace.com/u/ChadTurner)\
**Post date:** [May 19, 2023, 12:08pm UTC](https://community.dynatrace.com/t/extensions-2-0-snmp-using-query-to-change-variables/38633/2 "2023-05-19T12:08:52Z")

</div>

[@rdinis](https://community.dynatrace.com/user/58355)&nbsp;Do these entities show up as ‘Hosts’? if so, you could leverage host naming rules and target the detected name but then use regex to parse data out of it. I use Regex 101 to test and formulate regex for naming and tagging. I hope this helps 🙂
