<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Tagging services running on hosts with specific tag in Cloud platforms</title>
    <link>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/240350#M1594</link>
    <description>&lt;P&gt;Hi, glad you found it useful.&lt;BR /&gt;&lt;BR /&gt;As Paulo mentioned, you can get a list of properties of any entity type by calling the GET entity type API:&lt;BR /&gt;&lt;A href="https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/get-entity-type" target="_blank"&gt;https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/get-entity-type&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Eric_Yu_0-1710802179955.png" style="width: 602px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/18363i766C54E61A92FC50/image-dimensions/602x543?v=v2" width="602" height="543" role="button" title="Eric_Yu_0-1710802179955.png" alt="Eric_Yu_0-1710802179955.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;You can get also get a full list of entities in your environment if you're curious:&lt;BR /&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/api-entities-v2-get-all-entity-types" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/api-entities-v2-get-all-entity-types&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Mar 2024 22:50:55 GMT</pubDate>
    <dc:creator>Eric_Yu</dc:creator>
    <dc:date>2024-03-18T22:50:55Z</dc:date>
    <item>
      <title>Tagging services running on hosts with specific tag</title>
      <link>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/235412#M1508</link>
      <description>&lt;P&gt;I'm trying to separate data from different AWS accounts with Management Zones, so the best solution I found was to automatically tag all the hosts, processes and services that are in, let's say Account A. I already tagged all the Hosts and underlying processes with the tag Environment = stg. However I'm struggling when trying to tag all the Services that run on those EC2 instances. I've been exploring the API querying a single Service I got something as the following:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "entityId": "SERVICE-ABCD123",
    "type": "SERVICE",
    "displayName": "MyService",
    "firstSeenTms": 1702652961186,
    "lastSeenTms": 1706119883592,
    "properties": {
      "serviceType": "WEB_SERVICE",
(...)
    },
    "tags": [],
    "managementZones": [],
    "icon": {
      "primaryIconType": "web-sphere"
    },
    "fromRelationships": {
      "calls": [
        {
          "id": "SERVICE-DCBA321",
          "type": "SERVICE"
        }
      ],
      "runsOnHost": [
        {
          "id": "HOST-XYZ123",
          "type": "HOST"
        }
      ]
(...)
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;And regarding the Host is something like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;{
    "entityId": "HOST-XYZ123",
    "type": "HOST",
    "displayName": "MyHost.mydomain.org.me",
    "firstSeenTms": 1702564195134,
    "lastSeenTms": 1706119645611,
    "properties": {
      "bitness": "64",
      "installerTrackedDownload": false,
      "autoInjection": "ENABLED",
      "additionalSystemInfo": [
        {
          "value": "Amazon EC2",
          "key": "system.vendor"
        },
(...)
      ],
      "monitoringMode": "FULL_STACK",
      "osArchitecture": "X86",
      "osVersion": "Red Hat Enterprise Linux 8.9 (Ootpa) (kernel 4.18.0-513.9.1.el8_9.x86_64)",
      "installerPotentialProblem": false,
      "cloudType": "EC2",
      "macAddresses": [
        "12:37:37:2D:68:AB"
      ],
      "osType": "LINUX",
      "state": "RUNNING",
(...)
      "installerSupportAlert": false
    },
    "tags": [
      {
        "context": "CONTEXTLESS",
        "key": "Environment",
        "value": "stg",
        "stringRepresentation": "Environment:stg"
      }
    ],
    "managementZones": [],
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(I ommited non-relevant info with (...))&lt;/P&gt;&lt;P&gt;Following my logic it should be something like&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;type(SERVICE),fromRelationships.runsOn(type(HOST).tags(Environment=stg))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;Since "tags" is at the same level as type in the json. I'm not completely sure about the "=" sign to show which values of that tag I'm interested in.&amp;nbsp;However, the Entity Selector doesn't seem to understand what I'm trying to query since it doesn't understand the ".tags" part.&lt;/DIV&gt;&lt;DIV&gt;I've tried with&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;type(SERVICE),fromRelationships.runsOn(type(HOST).tags(Environment))​&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;but no success at all. Could someone guide me on how to achieve this?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ccbcloud_1-1706123554020.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17175i34459F9E7303C3EA/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ccbcloud_1-1706123554020.png" alt="ccbcloud_1-1706123554020.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="ccbcloud_0-1706123529666.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17174i608B9B055392FB13/image-size/medium?v=v2&amp;amp;px=400" role="button" title="ccbcloud_0-1706123529666.png" alt="ccbcloud_0-1706123529666.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jan 2024 19:18:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/235412#M1508</guid>
      <dc:creator>ccb-cloud</dc:creator>
      <dc:date>2024-01-24T19:18:42Z</dc:date>
    </item>
    <item>
      <title>Re: Tagging services running on hosts with specific tag</title>
      <link>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/235677#M1509</link>
      <description>&lt;P&gt;The fromRelationship property you are looking for should be "runsOnHost"&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Eric_Yu_0-1706284422343.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17257iE1D0B8FCC4336FA5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Eric_Yu_0-1706284422343.png" alt="Eric_Yu_0-1706284422343.png" /&gt;&lt;/span&gt;&lt;BR /&gt;For your example, something like this should work:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;type(SERVICE),fromRelationship.runsOnHost(type(HOST),tag(Environment))&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 15:55:43 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/235677#M1509</guid>
      <dc:creator>Eric_Yu</dc:creator>
      <dc:date>2024-01-26T15:55:43Z</dc:date>
    </item>
    <item>
      <title>Re: Tagging services running on hosts with specific tag</title>
      <link>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/240132#M1592</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/54474"&gt;@Eric_Yu&lt;/a&gt;&amp;nbsp;Where i can see these properties as this will help us lot if&amp;nbsp; we can get details like this?&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 02:41:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/240132#M1592</guid>
      <dc:creator>sujit_k_singh</dc:creator>
      <dc:date>2024-03-18T02:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Tagging services running on hosts with specific tag</title>
      <link>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/240259#M1593</link>
      <description>&lt;P&gt;Hi.&lt;BR /&gt;Make a call to the Entity types endpoint&lt;BR /&gt;api/v2&lt;SPAN&gt;/entityTypes?type=SERVICE&lt;BR /&gt;and set type parameter to whatever you need: SERVICE, HOST, etc.&lt;BR /&gt;&lt;BR /&gt;Best regards&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 11:20:34 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/240259#M1593</guid>
      <dc:creator>paulo_calaxa</dc:creator>
      <dc:date>2024-03-18T11:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: Tagging services running on hosts with specific tag</title>
      <link>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/240350#M1594</link>
      <description>&lt;P&gt;Hi, glad you found it useful.&lt;BR /&gt;&lt;BR /&gt;As Paulo mentioned, you can get a list of properties of any entity type by calling the GET entity type API:&lt;BR /&gt;&lt;A href="https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/get-entity-type" target="_blank"&gt;https://docs.dynatrace.com/docs/dynatrace-api/environment-api/entity-v2/get-entity-type&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Eric_Yu_0-1710802179955.png" style="width: 602px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/18363i766C54E61A92FC50/image-dimensions/602x543?v=v2" width="602" height="543" role="button" title="Eric_Yu_0-1710802179955.png" alt="Eric_Yu_0-1710802179955.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;You can get also get a full list of entities in your environment if you're curious:&lt;BR /&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/api-entities-v2-get-all-entity-types" target="_blank"&gt;https://docs.dynatrace.com/docs/shortlink/api-entities-v2-get-all-entity-types&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 22:50:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/240350#M1594</guid>
      <dc:creator>Eric_Yu</dc:creator>
      <dc:date>2024-03-18T22:50:55Z</dc:date>
    </item>
    <item>
      <title>Re: Tagging services running on hosts with specific tag</title>
      <link>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/241405#M1599</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/54474"&gt;@Eric_Yu&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/7432"&gt;@paulo_calaxa&lt;/a&gt;&amp;nbsp;Thanks for for your help, both solution works perfectly.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 29 Mar 2024 07:00:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/241405#M1599</guid>
      <dc:creator>sujit_k_singh</dc:creator>
      <dc:date>2024-03-29T07:00:16Z</dc:date>
    </item>
    <item>
      <title>Re: Tagging services running on hosts with specific tag</title>
      <link>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/252085#M1708</link>
      <description>&lt;P&gt;Thank you so much for this tips!&amp;nbsp;I have been looking for a solution for almost two weeks&lt;/P&gt;</description>
      <pubDate>Wed, 31 Jul 2024 12:23:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Cloud-platforms/Tagging-services-running-on-hosts-with-specific-tag/m-p/252085#M1708</guid>
      <dc:creator>Aurel</dc:creator>
      <dc:date>2024-07-31T12:23:03Z</dc:date>
    </item>
  </channel>
</rss>

