<?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 CPU/Memory usage % for a service in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/CPU-Memory-usage-for-a-service/m-p/286538#M2611</link>
    <description>&lt;P&gt;I am trying to create a custom metric to showcase CPU/Memory usage % of a service in a namespace in a cluster .&amp;nbsp;&lt;BR /&gt;Is there any way to do that .&lt;/P&gt;</description>
    <pubDate>Mon, 22 Sep 2025 16:40:16 GMT</pubDate>
    <dc:creator>achoud22</dc:creator>
    <dc:date>2025-09-22T16:40:16Z</dc:date>
    <item>
      <title>CPU/Memory usage % for a service</title>
      <link>https://community.dynatrace.com/t5/DQL/CPU-Memory-usage-for-a-service/m-p/286538#M2611</link>
      <description>&lt;P&gt;I am trying to create a custom metric to showcase CPU/Memory usage % of a service in a namespace in a cluster .&amp;nbsp;&lt;BR /&gt;Is there any way to do that .&lt;/P&gt;</description>
      <pubDate>Mon, 22 Sep 2025 16:40:16 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/CPU-Memory-usage-for-a-service/m-p/286538#M2611</guid>
      <dc:creator>achoud22</dc:creator>
      <dc:date>2025-09-22T16:40:16Z</dc:date>
    </item>
    <item>
      <title>Re: CPU/Memory usage % for a service</title>
      <link>https://community.dynatrace.com/t5/DQL/CPU-Memory-usage-for-a-service/m-p/286598#M2615</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;i try with this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;timeseries {
    mem_used  = sum(dt.kubernetes.container.memory_working_set, default:0),
    mem_limit = sum(dt.kubernetes.container.memory_limit,        default:0)
  },
  by:{ dt.entity.service, dt.entity.cloud_application_namespace },
  filter:{ dt.entity.cloud_application_namespace == "CLOUD_APPLICATION_NAMESPACE-xxxxxxxxxxxxxx" },
  nonempty:true
| fieldsAdd mem_pct = 100.0 * mem_used[] / mem_limit[]
| fieldsAdd service = entityName(dt.entity.service),
           namespace = entityName(dt.entity.cloud_application_namespace)
| fieldsKeep service, namespace, mem_pct&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;but I recive null. But mabye on my env limits are not set&lt;/P&gt;</description>
      <pubDate>Tue, 23 Sep 2025 10:41:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/CPU-Memory-usage-for-a-service/m-p/286598#M2615</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-09-23T10:41:51Z</dc:date>
    </item>
  </channel>
</rss>

