# Automatically tagging database

**URL:** <https://community.dynatrace.com/t/automatically-tagging-database/37940>\
**Category:** Open Q&A\
**Tags:** databases, tagging\
**Created:** [January 10, 2023, 10:12am UTC](https://community.dynatrace.com/t/automatically-tagging-database/37940 "2023-01-10T10:12:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![JAR1](https://avatars.discourse-cdn.com/v4/letter/j/c0e974/32.png) [@JAR1](https://community.dynatrace.com/u/JAR1)\
**Post date:** [January 10, 2023, 10:12am UTC](https://community.dynatrace.com/t/automatically-tagging-database/37940/1 "2023-01-10T10:12:19Z")

</div>

HI all.

I need to create an automatic tag with the condition of IP addresses,

 ![JAR1_0-1673345390325.png](https://global.discourse-cdn.com/dynatrace/original/2X/3/303c86adbdde6b3fc1ed64ba149bf41aa57f6e90.png)

but I don’t see that option:

 ![JAR1_1-1673345390326.png](https://global.discourse-cdn.com/dynatrace/original/3X/8/e/8eff6c426775638f70a8ebd30afc060b4183c6a4.png)

can anybody help me?

Thanks in advance and greetings!!

JAR

---

<div class="post-metadata">

**Author:** ![dannemca](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/dannemca/32/7215_2.png) [@dannemca](https://community.dynatrace.com/u/dannemca)\
**Post date:** [January 10, 2023, 12:33pm UTC](https://community.dynatrace.com/t/automatically-tagging-database/37940/2 "2023-01-10T12:33:45Z")

</div>

[@JAR1](https://community.dynatrace.com/user/57153), you can use the Entity Selector for this, like this:

type(SERVICE),databaseName.exists(),ipAddress(\<YourIPGoesHere\>)

More details of attributes you can use here: [Environment API v2 - Entity selector — Dynatrace Docs](https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector)

Try and let us know.

---

<div class="post-metadata">

**Author:** ![Romanenkov\_Al3x](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/romanenkov_al3x/32/36257_2.png) [@Romanenkov\_Al3x](https://community.dynatrace.com/u/Romanenkov_Al3x)\
**Post date:** [January 10, 2023, 12:46pm UTC](https://community.dynatrace.com/t/automatically-tagging-database/37940/3 "2023-01-10T12:46:53Z")

</div>

Hello. You can try with ip adress **ipAddress** &nbsp;attribute.

| type(service),ipAddress(“192.168…”) |
| --- |

> **[Environment API v2 - Entity selector](https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/entity-selector)**
>
> Learn the Environment API v2 entity selector syntax for filtering monitored entities by type, name, tag, management zone, and health state.

=======

“id”: “ipAddress”,  
“type”: “List”,  
“displayName”: “ipAddress”  
},

=========

In our environments, we use the **ports** to mark such services, maybe it will be useful for you.

 ![Romanenkov_Al3x_0-1673354569340.png](https://global.discourse-cdn.com/dynatrace/original/3X/7/4/746e682158c3b9fa7d10a5220ddbcf6419fcda26.png)

Regards,

Romanenkov Alex
