<?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 How to get the cloud provider name from Kubertenes in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/How-to-get-the-cloud-provider-name-from-Kubertenes/m-p/267582#M1613</link>
    <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The only way I've found to determine whether a cluster is running on AKS or EKS is to use a classicEntitySelector like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.cloud_application_namespace
| filter in (id, classicEntitySelector("""type(CLOUD_APPLICATION_NAMESPACE),toRelationships.isClusterOfNamespace(type(KUBERNETES_CLUSTER),fromRelationships.isClusterOfNode(type(KUBERNETES_NODE),kubernetesProviderType("PROVIDER_TYPE_EKS")))"""))
| fieldsAdd CLOUD_PROVIDER = "AWS"
| append [
fetch dt.entity.cloud_application_namespace
| filter in (id, classicEntitySelector("""type(CLOUD_APPLICATION_NAMESPACE),toRelationships.isClusterOfNamespace(type(KUBERNETES_CLUSTER),fromRelationships.isClusterOfNode(type(KUBERNETES_NODE),kubernetesProviderType("PROVIDER_TYPE_AKS")))"""))
| fieldsAdd CLOUD_PROVIDER = "AZURE"]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's quite limiting, because I can only use the classicEntitySelector through a filter.&lt;/P&gt;&lt;P&gt;As a result, I have to repeat the command through multiple appends, and I'm unable to handle cloud providers that aren't explicitly declared.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Do you have another idea for collecting this information?&lt;/P&gt;&lt;P&gt;Thanks. Aurélien.&lt;/P&gt;</description>
    <pubDate>Thu, 16 Jan 2025 06:13:06 GMT</pubDate>
    <dc:creator>AurelienGravier</dc:creator>
    <dc:date>2025-01-16T06:13:06Z</dc:date>
    <item>
      <title>How to get the cloud provider name from Kubertenes</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-get-the-cloud-provider-name-from-Kubertenes/m-p/267582#M1613</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;The only way I've found to determine whether a cluster is running on AKS or EKS is to use a classicEntitySelector like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.cloud_application_namespace
| filter in (id, classicEntitySelector("""type(CLOUD_APPLICATION_NAMESPACE),toRelationships.isClusterOfNamespace(type(KUBERNETES_CLUSTER),fromRelationships.isClusterOfNode(type(KUBERNETES_NODE),kubernetesProviderType("PROVIDER_TYPE_EKS")))"""))
| fieldsAdd CLOUD_PROVIDER = "AWS"
| append [
fetch dt.entity.cloud_application_namespace
| filter in (id, classicEntitySelector("""type(CLOUD_APPLICATION_NAMESPACE),toRelationships.isClusterOfNamespace(type(KUBERNETES_CLUSTER),fromRelationships.isClusterOfNode(type(KUBERNETES_NODE),kubernetesProviderType("PROVIDER_TYPE_AKS")))"""))
| fieldsAdd CLOUD_PROVIDER = "AZURE"]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's quite limiting, because I can only use the classicEntitySelector through a filter.&lt;/P&gt;&lt;P&gt;As a result, I have to repeat the command through multiple appends, and I'm unable to handle cloud providers that aren't explicitly declared.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Do you have another idea for collecting this information?&lt;/P&gt;&lt;P&gt;Thanks. Aurélien.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2025 06:13:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-get-the-cloud-provider-name-from-Kubertenes/m-p/267582#M1613</guid>
      <dc:creator>AurelienGravier</dc:creator>
      <dc:date>2025-01-16T06:13:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the cloud provider name from Kubertenes</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-get-the-cloud-provider-name-from-Kubertenes/m-p/267920#M1620</link>
      <description>&lt;P&gt;Hello Aurélien,&amp;nbsp;&lt;BR /&gt;The property&amp;nbsp;kubernetesProviderType is already present in the node entity, so you can use it without using the&amp;nbsp; classicEntitySelector.&amp;nbsp;&lt;BR /&gt;Here's the dql statement that you could use for instance:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch  dt.entity.cloud_application_namespace
| fields namespace_name=entity.name,clustered_by[dt.entity.kubernetes_cluster]
| join [ fetch dt.entity.kubernetes_node | fields clustered_by[dt.entity.kubernetes_cluster] , kubernetesProviderType], on:{`clustered_by[dt.entity.kubernetes_cluster]`}
| fieldsAdd  cluster=entityName(`clustered_by[dt.entity.kubernetes_cluster]`,type:"dt.entity.kubernetes_cluster"),provider_type=right.kubernetesProviderType
|fieldskeep cluster, namespace_name,provider_type&lt;/LI-CODE&gt;&lt;P&gt;Amine&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2025 17:47:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-get-the-cloud-provider-name-from-Kubertenes/m-p/267920#M1620</guid>
      <dc:creator>amine_bergi</dc:creator>
      <dc:date>2025-01-20T17:47:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the cloud provider name from Kubertenes</title>
      <link>https://community.dynatrace.com/t5/DQL/How-to-get-the-cloud-provider-name-from-Kubertenes/m-p/267965#M1622</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/5003"&gt;@amine_bergi&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Perfect, thank you for your help.&lt;BR /&gt;Regards&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2025 08:26:25 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/How-to-get-the-cloud-provider-name-from-Kubertenes/m-p/267965#M1622</guid>
      <dc:creator>AurelienGravier</dc:creator>
      <dc:date>2025-01-21T08:26:25Z</dc:date>
    </item>
  </channel>
</rss>

