<?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: How to retrieve a key value of metadata item in properties of an entity (openshift container)? in Container platforms</title>
    <link>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/193959#M1276</link>
    <description>&lt;P&gt;Hi Henri,&lt;BR /&gt;&lt;BR /&gt;If you like to filter for metadata from the properties section in the auto-tagging rules, you can use the following entity selector:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;type(CONTAINER_GROUP_INSTANCE), metadata(KUBERNETES_NAMESPACE:&amp;lt;VALUE&amp;gt;)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can exchange the &amp;lt;VALUE&amp;gt; with the namespace you want to filter for. I have attached an example for the kube-system namespace:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-09-06 at 15.51.34.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/7461i3977F0C35DC25CB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-09-06 at 15.51.34.png" alt="Screenshot 2022-09-06 at 15.51.34.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 07 Sep 2022 12:05:53 GMT</pubDate>
    <dc:creator>christoph_wilts</dc:creator>
    <dc:date>2022-09-07T12:05:53Z</dc:date>
    <item>
      <title>How to retrieve a key value of metadata item in properties of an entity (openshift container)?</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/193678#M1137</link>
      <description>&lt;P&gt;Hello all,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Retrieving the properties via API for a container instance delivers:&lt;/P&gt;
&lt;PRE&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;
  &lt;SPAN&gt;"entityId"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"CONTAINER_GROUP_INSTANCE-08E89EB939BF5F49"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"type"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"CONTAINER_GROUP_INSTANCE"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"displayName"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"pega-web-55959b478c-dx8qw"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
  &lt;SPAN&gt;"properties"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;{&lt;/SPAN&gt;
    &lt;SPAN&gt;"metadata"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;[&lt;/SPAN&gt;
      &lt;SPAN&gt;{&lt;/SPAN&gt;
        &lt;SPAN&gt;"key"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"KUBERNETES_NAMESPACE"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
        &lt;SPAN&gt;"value"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"pega-cm02-dev01"&lt;/SPAN&gt;
      &lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
      &lt;SPAN&gt;{&lt;/SPAN&gt;
        &lt;SPAN&gt;"key"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"KUBERNETES_FULL_POD_NAME"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
        &lt;SPAN&gt;"value"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"pega-web-55959b478c-dx8qw"&lt;/SPAN&gt;
      &lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
      &lt;SPAN&gt;{&lt;/SPAN&gt;
        &lt;SPAN&gt;"key"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"KUBERNETES_BASE_POD_NAME"&lt;/SPAN&gt;&lt;SPAN&gt;,&lt;/SPAN&gt;
        &lt;SPAN&gt;"value"&lt;/SPAN&gt;&lt;SPAN&gt;:&lt;/SPAN&gt; &lt;SPAN&gt;"pega-web-*"&lt;/SPAN&gt;
      &lt;SPAN&gt;}&lt;/SPAN&gt;
    &lt;SPAN&gt;]&lt;/SPAN&gt;
  &lt;SPAN&gt;}&lt;/SPAN&gt;
&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Now I need to check for a text in the KUBERNETES_NAMESPACE value from the metadata in properties to do some auto tagging. What is the syntax for that?&lt;/P&gt;
&lt;P&gt;This is as far as we got now:&amp;nbsp;type(CONTAINER_GROUP_INSTANCE),...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Henri&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 02 Sep 2022 07:55:32 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/193678#M1137</guid>
      <dc:creator>henridb</dc:creator>
      <dc:date>2022-09-02T07:55:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a key value of metadata item in properties of an entity (openshift container)?</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/193959#M1276</link>
      <description>&lt;P&gt;Hi Henri,&lt;BR /&gt;&lt;BR /&gt;If you like to filter for metadata from the properties section in the auto-tagging rules, you can use the following entity selector:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;type(CONTAINER_GROUP_INSTANCE), metadata(KUBERNETES_NAMESPACE:&amp;lt;VALUE&amp;gt;)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;You can exchange the &amp;lt;VALUE&amp;gt; with the namespace you want to filter for. I have attached an example for the kube-system namespace:&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2022-09-06 at 15.51.34.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/7461i3977F0C35DC25CB9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Screenshot 2022-09-06 at 15.51.34.png" alt="Screenshot 2022-09-06 at 15.51.34.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt; &lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 12:05:53 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/193959#M1276</guid>
      <dc:creator>christoph_wilts</dc:creator>
      <dc:date>2022-09-07T12:05:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a key value of metadata item in properties of an entity (openshift container)?</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/194087#M1286</link>
      <description>&lt;P&gt;Thanks Christoph,&lt;/P&gt;&lt;P&gt;It even works with multiple value pairs:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;type(CONTAINER_GROUP_INSTANCE), metadata(KUBERNETES_NAMESPACE:&amp;lt;VALUE&amp;gt;,KUBERNETES_NAMESPACE:&amp;lt;VALUE2&amp;gt;)&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 07:05:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/194087#M1286</guid>
      <dc:creator>henridb</dc:creator>
      <dc:date>2022-09-08T07:05:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a key value of metadata item in properties of an entity (openshift container)?</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/194137#M1294</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Christoph,&lt;BR /&gt;Any clue about which is the syntax if I want all entities where a metadata field has any value instead of a specific value? I'm looking for something like&amp;nbsp;type(CONTAINER_GROUP_INSTANCE), metadata(CLOUD_FOUNDRY_APP_NAME) which works for the majority of key:value fields but does not work for metadata.&lt;BR /&gt;In this case, I'm using the&amp;nbsp;/api/v2/entities API&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Alaor&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 02:42:18 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/194137#M1294</guid>
      <dc:creator>aporcher</dc:creator>
      <dc:date>2022-09-09T02:42:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a key value of metadata item in properties of an entity (openshift container)?</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/194161#M1297</link>
      <description>&lt;P&gt;Alaor,&amp;nbsp;&lt;/P&gt;&lt;P&gt;seems this one is EQUALS comparison only, no contains.&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Henri&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 11:23:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/194161#M1297</guid>
      <dc:creator>henridb</dc:creator>
      <dc:date>2022-09-09T11:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to retrieve a key value of metadata item in properties of an entity (openshift container)?</title>
      <link>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/194167#M1299</link>
      <description>&lt;P&gt;Yes Henri is right - it only allows EQUALS at the moment.&lt;BR /&gt;&lt;BR /&gt;The filter is following the Entity Attribute selector: &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;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 11:59:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Container-platforms/How-to-retrieve-a-key-value-of-metadata-item-in-properties-of-an/m-p/194167#M1299</guid>
      <dc:creator>christoph_wilts</dc:creator>
      <dc:date>2022-09-09T11:59:13Z</dc:date>
    </item>
  </channel>
</rss>

