<?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 How to trend off log field in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/How-to-trend-off-log-field/m-p/291159#M5550</link>
    <description>&lt;P&gt;I'm new to DT, so forgive me if this is too simple. What I am trying to do is create a dashboard which shows "operations" across a time period and only shows ones that:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Have degraded over the time period I am looking at&lt;/LI&gt;&lt;LI&gt;Have an average response time greater than some value I set (will be a variable)&lt;/LI&gt;&lt;LI&gt;Appear more than X times per .. day?&amp;nbsp; (will be a variable)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The response time is a field in our log entries (totalSecs). I added a dashboard portlet using this DQL:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;timeseries avg_duration = avg(log.totalsecs), by:{operation}&lt;BR /&gt;| filter(arrayAvg(avg_duration) &amp;gt; 2)&lt;BR /&gt;| filter(arrayAvg(avg_duration) &amp;lt; 3000)&lt;/P&gt;&lt;P&gt;I'm not sure how to do the first or last piece of the puzzle. I also *think* the filters I &lt;EM&gt;have&lt;/EM&gt; defined are working, but not sure if this syntax is right.&lt;/P&gt;</description>
    <pubDate>Tue, 09 Dec 2025 14:55:04 GMT</pubDate>
    <dc:creator>vm_molson</dc:creator>
    <dc:date>2025-12-09T14:55:04Z</dc:date>
    <item>
      <title>How to trend off log field</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-trend-off-log-field/m-p/291159#M5550</link>
      <description>&lt;P&gt;I'm new to DT, so forgive me if this is too simple. What I am trying to do is create a dashboard which shows "operations" across a time period and only shows ones that:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Have degraded over the time period I am looking at&lt;/LI&gt;&lt;LI&gt;Have an average response time greater than some value I set (will be a variable)&lt;/LI&gt;&lt;LI&gt;Appear more than X times per .. day?&amp;nbsp; (will be a variable)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;The response time is a field in our log entries (totalSecs). I added a dashboard portlet using this DQL:&lt;/P&gt;&lt;P class="lia-indent-padding-left-30px"&gt;timeseries avg_duration = avg(log.totalsecs), by:{operation}&lt;BR /&gt;| filter(arrayAvg(avg_duration) &amp;gt; 2)&lt;BR /&gt;| filter(arrayAvg(avg_duration) &amp;lt; 3000)&lt;/P&gt;&lt;P&gt;I'm not sure how to do the first or last piece of the puzzle. I also *think* the filters I &lt;EM&gt;have&lt;/EM&gt; defined are working, but not sure if this syntax is right.&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2025 14:55:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-trend-off-log-field/m-p/291159#M5550</guid>
      <dc:creator>vm_molson</dc:creator>
      <dc:date>2025-12-09T14:55:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to trend off log field</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-trend-off-log-field/m-p/291164#M5551</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;In my opinion, your current timeseries query correctly filters by average duration, but it can’t detect degradation over time or enforce “X times per day” conditions.&lt;/P&gt;&lt;P&gt;To do that, you need to:&lt;/P&gt;&lt;P&gt;aggregate per day&lt;/P&gt;&lt;P&gt;compare first vs last daily averages for degradation&lt;/P&gt;&lt;P&gt;apply the count per day threshold&lt;/P&gt;&lt;P&gt;This requires a log-based summarize approach, not just a single timeseries.&lt;BR /&gt;&lt;BR /&gt;Try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter isNotNull(totalSecs)

| fieldsAdd
    duration = toDouble(totalSecs),
    day = formatTimestamp(timestamp, format:"yyyy-MM-dd")

| summarize
    avg_duration = avg(duration),
    first_seen   = min(duration),
    last_seen    = max(duration),
    per_day      = count(),
    by:{operation, day}

| summarize
    avg_duration = avg(avg_duration),
    total_count  = sum(per_day),
    first_seen   = min(first_seen),
    last_seen    = max(last_seen),
    by:{operation}

| fieldsAdd
    degraded = last_seen &amp;gt; first_seen

| filter degraded == true
| filter avg_duration &amp;gt; 2
| filter total_count &amp;gt; 10&lt;/LI-CODE&gt;&lt;P&gt;This requires a log-based summarize approach, not just a single timeseries.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Dec 2025 16:04:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-trend-off-log-field/m-p/291164#M5551</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2025-12-09T16:04:58Z</dc:date>
    </item>
  </channel>
</rss>

