<?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: PRO TIP - DQL for Query Usage Cost and Audit. in Dynatrace tips</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/238324#M1169</link>
    <description>&lt;P&gt;Amazing tip&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/21769"&gt;@Dant3&lt;/a&gt;,&amp;nbsp;thanks for sharing!&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 27 Feb 2024 22:24:01 GMT</pubDate>
    <dc:creator>cesarsaravia</dc:creator>
    <dc:date>2024-02-27T22:24:01Z</dc:date>
    <item>
      <title>PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/237797#M1159</link>
      <description>&lt;P&gt;So, I&amp;nbsp; assumed that something like this might be already posted. But since I couldn't find it I will just drop it here, just in case.&lt;/P&gt;
&lt;P&gt;So with the new and shiny DQL and GA of DPS moving forward, we need a way to "Have a glance" at what the hell the users are querying. I expect that the lovely "Consumption" gets back for DPS at some point. But while we wait let's fix it with a Query lol.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So these two use cases have the same basic query:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch dt.system.events
| filter matchesValue(event.kind, "QUERY_EXECUTION_EVENT")
| sort timestamp DESC&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So for those that do not know, there are a bunch of buckets with system info... cool info.&lt;/P&gt;
&lt;P&gt;But with the event kind "QUERY_EXECUTION_EVENT" you get those juicy executed queries, doing a little math you can get (based on the default rate card) how much GB and $$$ are being dropped in those queries:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch dt.system.events
| filter matchesValue(event.kind, "QUERY_EXECUTION_EVENT")
| fieldsAdd consumidoGiB = ((scanned_bytes) * 0.000000000931322574615478515625) 
| fieldsAdd consumidoGiBCosto = consumidoGiB * 0.00365 
| fieldsKeep timestamp, consumidoGiBCosto, consumidoGiB, scanned_bytes, analysis_timeframe.start, analysis_timeframe.end, client.application_context, query_string, user, user.email
| summarize Cost = sum(consumidoGiBCosto), by:{user.email}
| sort Cost desc&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Look to those Juicy USD spent in queries!&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dant3_1-1708562455218.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17774i43E366D17F2558CF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dant3_1-1708562455218.png" alt="Dant3_1-1708562455218.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;And from where?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dant3_0-1708564004825.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17777iA23A222CEAF31728/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Dant3_0-1708564004825.png" alt="Dant3_0-1708564004825.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Anyhow.. this consumes too.. but so far I have only seen consumptions of maybe 11 MiB scanned, for 30 days in a "big" environment. So is cheap (IMO)&lt;/P&gt;
&lt;P&gt;Now.. one could also do something similar for those buckets that ARE important... you know, the one that might have PII stuff maybe.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch dt.system.events
| filter matchesValue(event.kind, "QUERY_EXECUTION_EVENT")
| fieldskeep timestamp, bucket, delivered_records, status, user, user.email, query_string
| sort timestamp DESC&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It is pretty much a simple query, the result is self-explanatory.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Dant3_2-1708563357232.png" style="width: 534px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/17776iF18A0EFA6C0E4AA5/image-dimensions/534x150?v=v2" width="534" height="150" role="button" title="Dant3_2-1708563357232.png" alt="Dant3_2-1708563357232.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;So, anyway hope you guys find it useful to track down those users who might consume... a little too much or maybe those apps and automations that have a high cost!&lt;/P&gt;
&lt;P&gt;Cheers&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 12:35:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/237797#M1159</guid>
      <dc:creator>Dant3</dc:creator>
      <dc:date>2024-02-26T12:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/238319#M1168</link>
      <description>&lt;P&gt;Great, thanks &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/21769"&gt;@Dant3&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 21:31:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/238319#M1168</guid>
      <dc:creator>DanielS</dc:creator>
      <dc:date>2024-02-27T21:31:23Z</dc:date>
    </item>
    <item>
      <title>Re: PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/238324#M1169</link>
      <description>&lt;P&gt;Amazing tip&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/21769"&gt;@Dant3&lt;/a&gt;,&amp;nbsp;thanks for sharing!&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Feb 2024 22:24:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/238324#M1169</guid>
      <dc:creator>cesarsaravia</dc:creator>
      <dc:date>2024-02-27T22:24:01Z</dc:date>
    </item>
    <item>
      <title>Re: PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/239698#M1198</link>
      <description>&lt;P&gt;Thats interesting. Thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/21769"&gt;@Dant3&lt;/a&gt;&amp;nbsp;for sharing this.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Mar 2024 05:18:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/239698#M1198</guid>
      <dc:creator>sujit_k_singh</dc:creator>
      <dc:date>2024-03-13T05:18:58Z</dc:date>
    </item>
    <item>
      <title>Re: PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/240279#M1201</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Thats interesting. Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Mar 2024 12:38:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/240279#M1201</guid>
      <dc:creator>Marcelo_santand</dc:creator>
      <dc:date>2024-03-18T12:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/272018#M1589</link>
      <description>&lt;P&gt;Great Info. BTW, is that possible to find the events in GB for each management zones (total number of events (in GB) in each MZs)? I will give a rough idea, how much it will cost if we are querying it.&lt;/P&gt;</description>
      <pubDate>Mon, 10 Mar 2025 15:09:28 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/272018#M1589</guid>
      <dc:creator>Sajarra</dc:creator>
      <dc:date>2025-03-10T15:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/287154#M1773</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/21769"&gt;@Dant3&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;We’ve noticed a billing increase over the last two weeks in our Dynatrace account, and we would like to understand the root cause. Specifically, we want to:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Identify which events, usage types, or capabilities are contributing to the increased costs.&lt;/LI&gt;&lt;LI&gt;Understand whether old Davis AI-based detections, which were set to inactive in July, could be related, since currently the Davis AI option appears disabled for all dashboard charts.&lt;/LI&gt;&lt;LI&gt;Get guidance on how to query or extract detailed billing and usage data that can help us pinpoint the high-cost events.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Could you please provide a DQL query or approach that would allow us to see:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Capability name&lt;/LI&gt;&lt;LI&gt;Environment&lt;/LI&gt;&lt;LI&gt;Entity (host, service, workflow, or log source)&lt;/LI&gt;&lt;LI&gt;Usage type&lt;/LI&gt;&lt;LI&gt;Usage volume&lt;/LI&gt;&lt;LI&gt;Cost in USD&lt;/LI&gt;&lt;LI&gt;Timestamp&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;…and any other details that would help us fully understand the billing increase?&lt;/P&gt;&lt;P&gt;This will help us take steps to optimize and reduce costs effectively.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2025 20:30:51 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/287154#M1773</guid>
      <dc:creator>dwarakanath</dc:creator>
      <dc:date>2025-10-01T20:30:51Z</dc:date>
    </item>
    <item>
      <title>Re: PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/288054#M1779</link>
      <description>&lt;P&gt;I am interested in the answer to this question.&lt;/P&gt;</description>
      <pubDate>Thu, 16 Oct 2025 15:42:25 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/288054#M1779</guid>
      <dc:creator>AlexLarrieu</dc:creator>
      <dc:date>2025-10-16T15:42:25Z</dc:date>
    </item>
    <item>
      <title>Re: PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/294335#M1877</link>
      <description>&lt;P&gt;Very useful thanks&lt;/P&gt;</description>
      <pubDate>Fri, 06 Feb 2026 15:57:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/294335#M1877</guid>
      <dc:creator>Scott_McMahon</dc:creator>
      <dc:date>2026-02-06T15:57:05Z</dc:date>
    </item>
    <item>
      <title>Re: PRO TIP - DQL for Query Usage Cost and Audit.</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/297332#M1901</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Amazing, Thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/21769"&gt;@Dant3&lt;/a&gt;&amp;nbsp;- Is it possible to view the raw query instead of *? This will be helpful to view the exact unmasked query strings.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2026 13:42:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-tips/PRO-TIP-DQL-for-Query-Usage-Cost-and-Audit/m-p/297332#M1901</guid>
      <dc:creator>kingstar17</dc:creator>
      <dc:date>2026-04-07T13:42:56Z</dc:date>
    </item>
  </channel>
</rss>

