<?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 kubernetes logs in DQL by cluster name in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/kubernetes-logs-in-DQL-by-cluster-name/m-p/261622#M1403</link>
    <description>&lt;P&gt;I have a dashboard for AWS EKS clusters where all the tiles are dependent on a $Cluster variable that contains the cluster name in the format derived from DQL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch dt.entity.kubernetes_cluster&lt;BR /&gt;| fields entity.name&lt;BR /&gt;| filter contains(entity.name, "engineering")&lt;BR /&gt;| sort entity.name asc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gives me cluster names such as "engineering-east1" , "engineering-east2" etc.&lt;/P&gt;&lt;P&gt;I want to pin a tile to the top of the dashboard that executes this log query (got this from the kubernetes app):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch logs&lt;BR /&gt;| filter dt.entity.kubernetes_cluster == "KUBERNETES_CLUSTER-986F4E539E5EE209" or in(dt.entity.kubernetes_cluster, "KUBERNETES_CLUSTER-986F4E539E5EE209")&lt;BR /&gt;| filter status == "ERROR" OR status == "WARN"&lt;BR /&gt;| sort timestamp desc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is that I would like to fetch the logs using that same $Cluster name that I've established in the dashboard variable, which is the entity.name from the&amp;nbsp;dt.entity.kubernetes_cluster, instead of the&amp;nbsp;KUBERNETES_CLUSTER string.&amp;nbsp; &amp;nbsp;I have not been able to perform any sort of lookup (ie swap in entity.name for the KUBERNETES_CLUSTER string)&amp;nbsp; in the fetch logs that would allow me to fetch the logs like that.&amp;nbsp; Does anyone know how I would do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 06 Nov 2024 03:59:21 GMT</pubDate>
    <dc:creator>roberto_camp1</dc:creator>
    <dc:date>2024-11-06T03:59:21Z</dc:date>
    <item>
      <title>kubernetes logs in DQL by cluster name</title>
      <link>https://community.dynatrace.com/t5/DQL/kubernetes-logs-in-DQL-by-cluster-name/m-p/261622#M1403</link>
      <description>&lt;P&gt;I have a dashboard for AWS EKS clusters where all the tiles are dependent on a $Cluster variable that contains the cluster name in the format derived from DQL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch dt.entity.kubernetes_cluster&lt;BR /&gt;| fields entity.name&lt;BR /&gt;| filter contains(entity.name, "engineering")&lt;BR /&gt;| sort entity.name asc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This gives me cluster names such as "engineering-east1" , "engineering-east2" etc.&lt;/P&gt;&lt;P&gt;I want to pin a tile to the top of the dashboard that executes this log query (got this from the kubernetes app):&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch logs&lt;BR /&gt;| filter dt.entity.kubernetes_cluster == "KUBERNETES_CLUSTER-986F4E539E5EE209" or in(dt.entity.kubernetes_cluster, "KUBERNETES_CLUSTER-986F4E539E5EE209")&lt;BR /&gt;| filter status == "ERROR" OR status == "WARN"&lt;BR /&gt;| sort timestamp desc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The issue is that I would like to fetch the logs using that same $Cluster name that I've established in the dashboard variable, which is the entity.name from the&amp;nbsp;dt.entity.kubernetes_cluster, instead of the&amp;nbsp;KUBERNETES_CLUSTER string.&amp;nbsp; &amp;nbsp;I have not been able to perform any sort of lookup (ie swap in entity.name for the KUBERNETES_CLUSTER string)&amp;nbsp; in the fetch logs that would allow me to fetch the logs like that.&amp;nbsp; Does anyone know how I would do this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Nov 2024 03:59:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/kubernetes-logs-in-DQL-by-cluster-name/m-p/261622#M1403</guid>
      <dc:creator>roberto_camp1</dc:creator>
      <dc:date>2024-11-06T03:59:21Z</dc:date>
    </item>
    <item>
      <title>Re: kubernetes logs in DQL by cluster name</title>
      <link>https://community.dynatrace.com/t5/DQL/kubernetes-logs-in-DQL-by-cluster-name/m-p/261821#M1410</link>
      <description>&lt;P&gt;Could you replace&amp;nbsp;&lt;SPAN&gt;dt.entity.kubernetes_cluster with k8s.cluster.name?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;Does the following query work for you?&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch logs
| filter k8s.cluster.name == $Cluster or in(k8s.cluster.name, $Cluster)
| filter status == "ERROR" OR status == "WARN"
| sort timestamp desc&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 May 2025 12:10:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/kubernetes-logs-in-DQL-by-cluster-name/m-p/261821#M1410</guid>
      <dc:creator>DavidRitter</dc:creator>
      <dc:date>2025-05-14T12:10:44Z</dc:date>
    </item>
  </channel>
</rss>

