<?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: Creating a dashboard with a formula &amp;quot;percentage of Kubernetes pod usage (requests/limits)&amp;quot; in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/251815#M4123</link>
    <description>&lt;P&gt;thx - if this is about namespace quotas, you can get these insights quickly in our &lt;A href="https://www.dynatrace.com/technologies/kubernetes-monitoring/" target="_blank"&gt;new Kubernetes app&lt;/A&gt; on the namespace screens. You can see the total of requested CPU/Mem vs. actual usage. Further below, we display how much CPU/Mem requests are being used out of the defined quota.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="florian_g_0-1722244616513.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21430i4B4D23D094C5570C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="florian_g_0-1722244616513.png" alt="florian_g_0-1722244616513.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 29 Jul 2024 09:19:56 GMT</pubDate>
    <dc:creator>florian_g</dc:creator>
    <dc:date>2024-07-29T09:19:56Z</dc:date>
    <item>
      <title>Creating a dashboard with a formula "percentage of Kubernetes pod usage (requests/limits)"</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/205408#M2749</link>
      <description>&lt;P&gt;So I am able to see a % of the CPU being requested per pods compared to the limit of the CPU on said pod using the following formual:&lt;/P&gt;
&lt;P&gt;(&lt;BR /&gt;builtin:cloud.kubernetes.pod.cpuRequests:last:splitBy("dt.entity.cloud_application_instance")&lt;BR /&gt;/ builtin:cloud.kubernetes.pod.cpuLimits:last:splitBy("dt.entity.cloud_application_instance")&lt;BR /&gt;* 100&lt;BR /&gt;):setUnit(Percent):sort(value(sum,descending))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But I am trying to add a filter to this by saying that I only want the data with a specific K8 cluster. When I create a dashboard tile for the above formula and then I add a dynamic filter on the dashboard to limit by a specific Kubernete Cluster, that dynamic filter doesn't work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, I am now trying to enter a Kubernete cluster filter into the formula but I'm running into issues. Any suggestions on how I can achieve this? I tried adding things like "dt.entity.kuberentes_cluster" at the end of both metrics like below, but it does not work.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;(&lt;BR /&gt;builtin:cloud.kubernetes.pod.cpuRequests:last:splitBy("dt.entity.cloud_application_instance", "dt.entity.kubernetes_cluster")&lt;BR /&gt;/ builtin:cloud.kubernetes.pod.cpuLimits:last:splitBy("dt.entity.cloud_application_instance","dt.entity.kubernetes_cluster")&lt;BR /&gt;* 100&lt;BR /&gt;):setUnit(Percent):sort(value(sum,descending))&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 13:34:45 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/205408#M2749</guid>
      <dc:creator>shakib</dc:creator>
      <dc:date>2023-05-22T13:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dashboard with a formula -Percentage of K8 pod usage (requests/limits)</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/205409#M2750</link>
      <description>&lt;P&gt;So in this example below I see a % of the CPU requested from the allocated on a Node. I want this same data at the pod level, which is what I am trying to find out in my formula above.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;(&lt;BR /&gt;builtin:kubernetes.node.requests_cpu:last:splitBy("dt.entity.kubernetes_node","dt.entity.kubernetes_cluster"):sum&lt;BR /&gt;/ builtin:kubernetes.node.cpu_allocatable:last:splitBy("dt.entity.kubernetes_node","dt.entity.kubernetes_cluster"):sum&lt;BR /&gt;* 100&lt;BR /&gt;):setUnit(Percent):sort(value(sum,descending))&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 17:18:44 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/205409#M2750</guid>
      <dc:creator>shakib</dc:creator>
      <dc:date>2023-02-22T17:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dashboard with a formula -Percentage of K8 pod usage (requests/limits)</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/205412#M2751</link>
      <description>&lt;P&gt;Ok I figured out how to get it to work with an environment tag filter. But the problems Dynatrace is reporting to me are different than the ones I am seeing from my formula which now looks like:&lt;/P&gt;&lt;P&gt;(builtin:cloud.kubernetes.pod.cpuRequests:filter(and(or(in("dt.entity.cloud_application_instance",entitySelector("type(cloud_application_instance),fromRelationship.runsOn(type(KUBERNETES_NODE),tag(~"Environment:TagHERE~"))"))))):splitBy("dt.entity.cloud_application_instance") / builtin:cloud.kubernetes.pod.cpuLimits:filter(and(or(in("dt.entity.cloud_application_instance",entitySelector("type(cloud_application_instance),fromRelationship.runsOn(type(KUBERNETES_NODE),tag(~"Environment:TagHERE~"))"))))):splitBy("dt.entity.cloud_application_instance") * 100 ) :sort(value(auto,descending)):setUnit(Percent)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess this means that the CPU request saturation alerts that Dynatrace is showing me (which are worthless as they point to a Node and not an actual Pod that I can point to and say this is the problem one) are using some other statistic.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2023 17:39:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/205412#M2751</guid>
      <dc:creator>shakib</dc:creator>
      <dc:date>2023-02-22T17:39:19Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dashboard with a formula "percentage of Kubernetes pod usage (requests/limits)"</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/214007#M2986</link>
      <description>&lt;P&gt;Hi &lt;span class="lia-unicode-emoji" title=":waving_hand:"&gt;👋&lt;/span&gt;,&lt;/P&gt;
&lt;P&gt;Here are a few thoughts from my end - I hope they help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;The metrics you're using in your expression are meanwhile deprecated. I recommend using the following alternative:&lt;BR /&gt;(&lt;BR /&gt;builtin:kubernetes.workload.requests_cpu:last:splitBy("dt.entity.cloud_application", "dt.entity.kubernetes_cluster")&lt;BR /&gt;/ builtin:kubernetes.workload.limits_cpu:last:splitBy("dt.entity.cloud_application","dt.entity.kubernetes_cluster")&lt;BR /&gt;* 100&lt;BR /&gt;):setUnit(Percent):sort(value(sum,descending))&lt;BR /&gt;&lt;BR /&gt;With that expression, also the filtering works.&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;LI&gt;I'm interested in the use-case behind the expression: Why do you want to know CPU requests compared to limits on a pod level? What I usually see is people comparing
&lt;OL&gt;
&lt;LI&gt;usage to requests on a workload level ("is my workload on average using what it is guaranteed and what it is blocking -&amp;gt; mostly about cost-efficiency by optimizing requests of workloads")&lt;/LI&gt;
&lt;LI&gt;OR they compare usage to limits ("is my workload hitting the limits? -&amp;gt; hitting the limits results in CPU throttling in case of CPU and OOM kills in case of memory").&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Best,&lt;/P&gt;
&lt;P&gt;Florian&lt;/P&gt;</description>
      <pubDate>Mon, 05 Jun 2023 07:21:12 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/214007#M2986</guid>
      <dc:creator>florian_g</dc:creator>
      <dc:date>2023-06-05T07:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dashboard with a formula "percentage of Kubernetes pod usage (requests/limits)"</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/251796#M4118</link>
      <description>&lt;P&gt;When someone is running a multitenant environment, you usually put limits on how much CPU per namespace, not per workload.&amp;nbsp; When customers need higher than alloted CPU or MEM, they can be given more on a per namespace/tenant basis, often ppl will request too much per pod.&amp;nbsp; where they only use maybe 1% of what they really requested for the pod.&amp;nbsp; In this case you want to be able to show them when they are simply requesting too much for other pods and that 's why they run into limits.&amp;nbsp; Again .. this is not workload or node based limits.&amp;nbsp; So I do understand the question of initial poster. ( Even though I also don't have the answer )&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind rgds,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 06:52:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/251796#M4118</guid>
      <dc:creator>PeterDrenth1</dc:creator>
      <dc:date>2024-07-29T06:52:27Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a dashboard with a formula "percentage of Kubernetes pod usage (requests/limits)"</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/251815#M4123</link>
      <description>&lt;P&gt;thx - if this is about namespace quotas, you can get these insights quickly in our &lt;A href="https://www.dynatrace.com/technologies/kubernetes-monitoring/" target="_blank"&gt;new Kubernetes app&lt;/A&gt; on the namespace screens. You can see the total of requested CPU/Mem vs. actual usage. Further below, we display how much CPU/Mem requests are being used out of the defined quota.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="florian_g_0-1722244616513.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/21430i4B4D23D094C5570C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="florian_g_0-1722244616513.png" alt="florian_g_0-1722244616513.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 29 Jul 2024 09:19:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Creating-a-dashboard-with-a-formula-quot-percentage-of/m-p/251815#M4123</guid>
      <dc:creator>florian_g</dc:creator>
      <dc:date>2024-07-29T09:19:56Z</dc:date>
    </item>
  </channel>
</rss>

