<?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: makeTimeseries from DQL to chart EC2 instances used by Kubernetes in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/makeTimeseries-from-DQL-to-chart-EC2-instances-used-by/m-p/246554#M927</link>
    <description>&lt;P&gt;In this case case there is no need to (and in fact you cannot) use &lt;EM&gt;&lt;STRONG&gt;makeTimeseries&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;Time dimension does not exist in result of &lt;EM&gt;&lt;STRONG&gt;fetch &amp;lt;entity&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt; query. To count occurrences of particular field &lt;EM&gt;&lt;STRONG&gt;summarize&lt;/STRONG&gt;&lt;/EM&gt; is enough:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.kubernetes_node
//| filter in(id, classicEntitySelector("type(KUBERNETES_NODE),toRelationship.isClusterOfNode(type(KUBERNETES_CLUSTER),entityName.equals(operations-1))"))
| fields entity.name
| lookup [
    fetch dt.entity.ec2_instance 
    | fields localHostName, awsInstanceType
    ], lookupField:localHostName, sourceField:entity.name
| summarize {cnt=count()}, by: {lookup.awsInstanceType}
| fieldsAdd lookup.awsInstanceType = coalesce(lookup.awsInstanceType, "Unknown")
| sort cnt desc&lt;/LI-CODE&gt;&lt;P&gt;note: I commented out filer for cluster name. I do not have such name in&amp;nbsp; my environment. Result looks like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1716582626958.png" style="width: 835px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20101i1D299E3E557EE75A/image-dimensions/835x406?v=v2" width="835" height="406" role="button" title="krzysztof_hoja_0-1716582626958.png" alt="krzysztof_hoja_0-1716582626958.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 24 May 2024 20:31:09 GMT</pubDate>
    <dc:creator>krzysztof_hoja</dc:creator>
    <dc:date>2024-05-24T20:31:09Z</dc:date>
    <item>
      <title>makeTimeseries from DQL to chart EC2 instances used by Kubernetes</title>
      <link>https://community.dynatrace.com/t5/DQL/makeTimeseries-from-DQL-to-chart-EC2-instances-used-by/m-p/246421#M923</link>
      <description>&lt;P&gt;I have the following DQL query that I would like visualize as a simple bar or donut chart, to display the ec2 instance types of the worker nodes in my EKS cluster at any give time.&lt;/P&gt;
&lt;P&gt;We have multiple EKS clusters in several different development and production accounts and tracking ec2 instance type might be of value to us.&lt;/P&gt;
&lt;P&gt;I am having difficulty mapping the query to the makeTimeseries command.&lt;/P&gt;
&lt;P&gt;Can anyone suggest a nice way to achieve this?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;```&lt;BR /&gt;fetch dt.entity.kubernetes_node&lt;BR /&gt;| filter in(id, classicEntitySelector("type(KUBERNETES_NODE),toRelationship.isClusterOfNode(type(KUBERNETES_CLUSTER),entityName.equals(operations-1))"))&lt;BR /&gt;| fields entity.name&lt;BR /&gt;| lookup [fetch dt.entity.ec2_instance | fields localHostName, awsInstanceType],lookupField:localHostName,sourceField:entity.name&lt;/P&gt;
&lt;P&gt;// | makeTimeseries count()&lt;BR /&gt;| makeTimeseries count(default: 0), interval: 30m&lt;/P&gt;
&lt;P&gt;```&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I keep getting the error: "Please specify the parameter `time` explicitly, as the implicit default `timestamp` doesn't exist."&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 09:30:48 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/makeTimeseries-from-DQL-to-chart-EC2-instances-used-by/m-p/246421#M923</guid>
      <dc:creator>roberto_camp1</dc:creator>
      <dc:date>2024-05-24T09:30:48Z</dc:date>
    </item>
    <item>
      <title>Re: makeTimeseries from DQL to chart EC2 instances used by Kubernetes</title>
      <link>https://community.dynatrace.com/t5/DQL/makeTimeseries-from-DQL-to-chart-EC2-instances-used-by/m-p/246554#M927</link>
      <description>&lt;P&gt;In this case case there is no need to (and in fact you cannot) use &lt;EM&gt;&lt;STRONG&gt;makeTimeseries&lt;/STRONG&gt;&lt;/EM&gt;&lt;BR /&gt;Time dimension does not exist in result of &lt;EM&gt;&lt;STRONG&gt;fetch &amp;lt;entity&amp;gt;&lt;/STRONG&gt;&lt;/EM&gt; query. To count occurrences of particular field &lt;EM&gt;&lt;STRONG&gt;summarize&lt;/STRONG&gt;&lt;/EM&gt; is enough:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch dt.entity.kubernetes_node
//| filter in(id, classicEntitySelector("type(KUBERNETES_NODE),toRelationship.isClusterOfNode(type(KUBERNETES_CLUSTER),entityName.equals(operations-1))"))
| fields entity.name
| lookup [
    fetch dt.entity.ec2_instance 
    | fields localHostName, awsInstanceType
    ], lookupField:localHostName, sourceField:entity.name
| summarize {cnt=count()}, by: {lookup.awsInstanceType}
| fieldsAdd lookup.awsInstanceType = coalesce(lookup.awsInstanceType, "Unknown")
| sort cnt desc&lt;/LI-CODE&gt;&lt;P&gt;note: I commented out filer for cluster name. I do not have such name in&amp;nbsp; my environment. Result looks like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krzysztof_hoja_0-1716582626958.png" style="width: 835px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/20101i1D299E3E557EE75A/image-dimensions/835x406?v=v2" width="835" height="406" role="button" title="krzysztof_hoja_0-1716582626958.png" alt="krzysztof_hoja_0-1716582626958.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 24 May 2024 20:31:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/makeTimeseries-from-DQL-to-chart-EC2-instances-used-by/m-p/246554#M927</guid>
      <dc:creator>krzysztof_hoja</dc:creator>
      <dc:date>2024-05-24T20:31:09Z</dc:date>
    </item>
    <item>
      <title>Re: makeTimeseries from DQL to chart EC2 instances used by Kubernetes</title>
      <link>https://community.dynatrace.com/t5/DQL/makeTimeseries-from-DQL-to-chart-EC2-instances-used-by/m-p/246574#M929</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/25373"&gt;@krzysztof_hoja&lt;/a&gt;&amp;nbsp;that works very well!&lt;/P&gt;</description>
      <pubDate>Sun, 26 May 2024 16:21:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/makeTimeseries-from-DQL-to-chart-EC2-instances-used-by/m-p/246574#M929</guid>
      <dc:creator>roberto_camp1</dc:creator>
      <dc:date>2024-05-26T16:21:56Z</dc:date>
    </item>
  </channel>
</rss>

