<?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 Add databases automatically in a management zone based on relationship in Open Q&amp;A</title>
    <link>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207610#M25271</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My host group (or my namespaces in k8S env) contains app_env information and I use them to create 2 distinguished tags "app:xxx" and "env:xxx" on hosts, process and services side.&lt;BR /&gt;Afterward, I create management zones and I use an entity selector as condition to add databases automatically based on origin calls service tags values like below :&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;type(SERVICE),databaseName.exists(),toRelationships.calls(type(SERVICE),tag("env:prod","app:app"))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;It almost works ! The problem is the logical condition between tags is a OR condition as indicated here :&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;A href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector#tag" target="_blank" rel="noopener"&gt;https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector#tag&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;"An entity with&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;of the specified tags is included to the response."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I could use only one tag env:app-prod on my services, process, and host but I want to know if you have other ideas.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Thank you.&lt;BR /&gt;Regards.&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Wed, 22 Mar 2023 07:03:21 GMT</pubDate>
    <dc:creator>AurelienGravier</dc:creator>
    <dc:date>2023-03-22T07:03:21Z</dc:date>
    <item>
      <title>Add databases automatically in a management zone based on relationship</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207610#M25271</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My host group (or my namespaces in k8S env) contains app_env information and I use them to create 2 distinguished tags "app:xxx" and "env:xxx" on hosts, process and services side.&lt;BR /&gt;Afterward, I create management zones and I use an entity selector as condition to add databases automatically based on origin calls service tags values like below :&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV class=""&gt;&lt;STRONG&gt;type(SERVICE),databaseName.exists(),toRelationships.calls(type(SERVICE),tag("env:prod","app:app"))&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;It almost works ! The problem is the logical condition between tags is a OR condition as indicated here :&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;A href="https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector#tag" target="_blank" rel="noopener"&gt;https://www.dynatrace.com/support/help/dynatrace-api/environment-api/entity-v2/entity-selector#tag&lt;/A&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&lt;SPAN&gt;"An entity with&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;any&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;of the specified tags is included to the response."&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;I could use only one tag env:app-prod on my services, process, and host but I want to know if you have other ideas.&lt;/DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class=""&gt;Thank you.&lt;BR /&gt;Regards.&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Wed, 22 Mar 2023 07:03:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207610#M25271</guid>
      <dc:creator>AurelienGravier</dc:creator>
      <dc:date>2023-03-22T07:03:21Z</dc:date>
    </item>
    <item>
      <title>Re: Add databases automatically in a management zone based on relationship</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207614#M25273</link>
      <description>&lt;P data-unlink="true"&gt;Hi Aurelien,&amp;nbsp;&lt;BR /&gt;You can try to use this kind of MetricSelector expression based on HostGroup instead of tag (restrictive indeed) :&amp;nbsp;&lt;BR /&gt;Case 1 : several host group&lt;BR /&gt;&lt;STRONG data-stringify-type="bold"&gt;&lt;I data-stringify-type="italic"&gt;type(service),databaseName.exists(),toRelationships.calls(&lt;BR /&gt;&amp;nbsp; type(service),fromRelationships.runsOnHost(&lt;BR /&gt;&amp;nbsp; &amp;nbsp; type(host),fromRelationships.isInstanceOf(type(HOST_GROUP),&lt;/I&gt;&lt;/STRONG&gt;&lt;STRONG data-stringify-type="bold"&gt;&lt;I data-stringify-type="italic"&gt;entityName.in&lt;/I&gt;&lt;/STRONG&gt;&lt;STRONG data-stringify-type="bold"&gt;&lt;I data-stringify-type="italic"&gt;("env1, env2, ...")&lt;BR /&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;Case 2 : one host group&lt;BR /&gt;&lt;STRONG data-stringify-type="bold"&gt;&lt;I data-stringify-type="italic"&gt;entityName.contains&lt;/I&gt;&lt;/STRONG&gt;&lt;STRONG data-stringify-type="bold"&gt;&lt;I data-stringify-type="italic"&gt;("env1")&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/STRONG&gt;Why make your life difficult? &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&amp;nbsp;&lt;BR /&gt;Can you test it ?&lt;BR /&gt;I hope it helps.&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;/SPAN&gt;&lt;STRONG data-stringify-type="bold"&gt;&lt;I data-stringify-type="italic"&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG data-stringify-type="bold"&gt;&lt;I data-stringify-type="italic"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/I&gt;&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 07:40:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207614#M25273</guid>
      <dc:creator>uros_djukic1</dc:creator>
      <dc:date>2023-03-23T07:40:17Z</dc:date>
    </item>
    <item>
      <title>Re: Add databases automatically in a management zone based on relationship</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207687#M25282</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/26886"&gt;@uros_djukic1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's brilliant thank you, it works great :&lt;/P&gt;&lt;P&gt;type(service),databaseName.exists(),toRelationships.calls(type(service),fromRelationships.runsOnHost(type(host),fromRelationships.isInstanceOf(type(HOST_GROUP),entityName.contains("app1-prod"))))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Do you have an equivalent for kubernetes based on kubernetes namespace value ?&lt;/P&gt;&lt;P&gt;Because, I can do it with the entity selector below but only egal and exist are available (I would like contains) :&lt;/P&gt;&lt;P&gt;type(service),databaseName.exists(),toRelationships.calls(type(service),fromRelationships.runsOn(type(process_group),metadata("KUBERNETES_NAMESPACE:gp-sales-app1-prod")))&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.dynatrace.com/support/help/shortlink/api-entities-v2-selector#attribute" target="_blank"&gt;https://www.dynatrace.com/support/help/shortlink/api-entities-v2-selector#attribute&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much&lt;/P&gt;</description>
      <pubDate>Wed, 22 Mar 2023 15:51:26 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207687#M25282</guid>
      <dc:creator>AurelienGravier</dc:creator>
      <dc:date>2023-03-22T15:51:26Z</dc:date>
    </item>
    <item>
      <title>Re: Add databases automatically in a management zone based on relationship</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207763#M25290</link>
      <description>&lt;P&gt;For Kubernete try this :&amp;nbsp;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;type(service),databaseName.exists(),toRelationships.calls(type(~"SERVICE~"),fromRelationship.runsOn(type(PROCESS_GROUP),toRelationship.isNamespaceOfPg(type(~"CLOUD_APPLICATION_NAMESPACE~"),entityName.contains(~"app1-prod~"))))&lt;/EM&gt;&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;My MetricExpression :&amp;nbsp;&lt;BR /&gt;&lt;EM&gt;builtin:service.requestCount.server:filter(and(or(in("dt.entity.service",entitySelector("type(service),toRelationships.calls(type(~"SERVICE~"),fromRelationship.runsOn(type(PROCESS_GROUP),toRelationship.isNamespaceOfPg(type(~"CLOUD_APPLICATION_NAMESPACE~"),entityName.contains(~"online~"))))"))))):splitBy("dt.entity.service"):sort(value(auto,descending)):limit(20)&lt;/EM&gt;&lt;BR /&gt;&lt;BR /&gt;Result :&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uros_djukic1_0-1679568057425.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10627iCF674680C774D481/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uros_djukic1_0-1679568057425.png" alt="uros_djukic1_0-1679568057425.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="uros_djukic1_1-1679568210262.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10628i30554C3962D561D6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="uros_djukic1_1-1679568210262.png" alt="uros_djukic1_1-1679568210262.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 10:45:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207763#M25290</guid>
      <dc:creator>uros_djukic1</dc:creator>
      <dc:date>2023-03-23T10:45:29Z</dc:date>
    </item>
    <item>
      <title>Re: Add databases automatically in a management zone based on relationship</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207774#M25292</link>
      <description>&lt;P&gt;You rock&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/26886"&gt;@uros_djukic1&lt;/a&gt;&amp;nbsp; ! It's perfect for my need, thank you very much.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Mar 2023 11:31:20 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/207774#M25292</guid>
      <dc:creator>AurelienGravier</dc:creator>
      <dc:date>2023-03-23T11:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: Add databases automatically in a management zone based on relationship</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/224988#M28883</link>
      <description>&lt;P&gt;Hi Aurelien, the purposed solution works, by the way if you want to apply an AND in service filter, you can do as follows:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;type(SERVICE),databaseName.exists(),toRelationships.calls(type(SERVICE),tag("env:prod"),tag("app:app"))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 10 Oct 2023 14:08:25 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/224988#M28883</guid>
      <dc:creator>paolo_fumanelli</dc:creator>
      <dc:date>2023-10-10T14:08:25Z</dc:date>
    </item>
    <item>
      <title>Re: Add databases automatically in a management zone based on relationship</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/225047#M28902</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/19328"&gt;@paolo_fumanelli&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You will make my day better, so simple solution to manage tags on entity selector, I tried it on service entity only :&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;OR LOGICAL between tags values :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;type(SERVICE),tag("env:prod","app:myappname")&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;LOGICAL AND between tags values :&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;type(SERVICE),tag("env:prod"),tag("app:myappname")&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you. Regards&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 07:50:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/225047#M28902</guid>
      <dc:creator>AurelienGravier</dc:creator>
      <dc:date>2023-10-11T07:50:03Z</dc:date>
    </item>
    <item>
      <title>Re: Add databases automatically in a management zone based on relationship</title>
      <link>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/225051#M28903</link>
      <description>&lt;P&gt;Sure, that works for any entitySelector. All provided criteria (separated by comma) must be fullfilled (AND logic), while when providing more that one value in the same criteria (if the criteria accepts this), OR logic is applied.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Glad to have helped you&lt;/P&gt;</description>
      <pubDate>Wed, 11 Oct 2023 08:07:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Open-Q-A/Add-databases-automatically-in-a-management-zone-based-on/m-p/225051#M28903</guid>
      <dc:creator>paolo_fumanelli</dc:creator>
      <dc:date>2023-10-11T08:07:22Z</dc:date>
    </item>
  </channel>
</rss>

