<?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 Count of problem based on duration its open. &amp;lt;1 hour &amp;lt;12 hours &amp;lt;24 hours &amp;gt;24 hours. in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Count-of-problem-based-on-duration-its-open-lt-1-hour-lt-12/m-p/221342#M221</link>
    <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Can you please let me know how to apply these filters and get the counts based on duration of the problem open.&lt;/P&gt;&lt;P&gt;Requirement:&amp;nbsp;Count of problem based on duration its open. &amp;lt;1 hour &amp;lt;12 hours &amp;lt;24 hours &amp;gt;24 hours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch events, from:-30d&lt;BR /&gt;| filter event.kind == "DAVIS_PROBLEM"&lt;/P&gt;&lt;P&gt;| fieldsAdd open_ts = if(event.status == "ACTIVE" AND event.status_transition == "UPDATED",timestamp)&lt;BR /&gt;| filter isNotNull(open_ts)&lt;BR /&gt;| summarize&lt;BR /&gt;open = min(open_ts),&lt;BR /&gt;by:{display_id, event.category, event.name }&lt;BR /&gt;| summarize&lt;BR /&gt;count=countDistinct(display_id),&lt;BR /&gt;by:{open}&lt;/P&gt;&lt;P&gt;| summarize count = count()&lt;BR /&gt;| sort count desc&lt;/P&gt;</description>
    <pubDate>Wed, 23 Aug 2023 05:46:13 GMT</pubDate>
    <dc:creator>Bhargav_314</dc:creator>
    <dc:date>2023-08-23T05:46:13Z</dc:date>
    <item>
      <title>Count of problem based on duration its open. &lt;1 hour &lt;12 hours &lt;24 hours &gt;24 hours.</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-problem-based-on-duration-its-open-lt-1-hour-lt-12/m-p/221342#M221</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;Can you please let me know how to apply these filters and get the counts based on duration of the problem open.&lt;/P&gt;&lt;P&gt;Requirement:&amp;nbsp;Count of problem based on duration its open. &amp;lt;1 hour &amp;lt;12 hours &amp;lt;24 hours &amp;gt;24 hours.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch events, from:-30d&lt;BR /&gt;| filter event.kind == "DAVIS_PROBLEM"&lt;/P&gt;&lt;P&gt;| fieldsAdd open_ts = if(event.status == "ACTIVE" AND event.status_transition == "UPDATED",timestamp)&lt;BR /&gt;| filter isNotNull(open_ts)&lt;BR /&gt;| summarize&lt;BR /&gt;open = min(open_ts),&lt;BR /&gt;by:{display_id, event.category, event.name }&lt;BR /&gt;| summarize&lt;BR /&gt;count=countDistinct(display_id),&lt;BR /&gt;by:{open}&lt;/P&gt;&lt;P&gt;| summarize count = count()&lt;BR /&gt;| sort count desc&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2023 05:46:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-problem-based-on-duration-its-open-lt-1-hour-lt-12/m-p/221342#M221</guid>
      <dc:creator>Bhargav_314</dc:creator>
      <dc:date>2023-08-23T05:46:13Z</dc:date>
    </item>
    <item>
      <title>Re: Count of problem based on duration its open. &lt;1 hour &lt;12 hours &lt;24 hours &gt;24 hours.</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-problem-based-on-duration-its-open-lt-1-hour-lt-12/m-p/236869#M641</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/63764"&gt;@Bhargav_314&lt;/a&gt;&amp;nbsp;were you able to get a DQL statement that achieves your desired outcome?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 19:54:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-problem-based-on-duration-its-open-lt-1-hour-lt-12/m-p/236869#M641</guid>
      <dc:creator>ChadTurner</dc:creator>
      <dc:date>2024-02-12T19:54:57Z</dc:date>
    </item>
    <item>
      <title>Re: Count of problem based on duration its open. &lt;1 hour &lt;12 hours &lt;24 hours &gt;24 hours.</title>
      <link>https://community.dynatrace.com/t5/DQL/Count-of-problem-based-on-duration-its-open-lt-1-hour-lt-12/m-p/236872#M642</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;That should be the query you are looking for&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch events, from:now()-370m
| filter dt.system.bucket == "default_davis_events"
| filter event.kind == "DAVIS_PROBLEM"
| summarize {problem=takeMax(record(timestamp,resolved_problem_duration,dt.davis.is_duplicate,event.status,maintenance.is_under_maintenance,dt.davis.is_frequent_event, event.start)) }, by:{display_id}
| fieldsFlatten problem
| filter problem.event.status != "CLOSED"
| filter problem.dt.davis.is_duplicate == false and problem.maintenance.is_under_maintenance == false
| fieldsAdd duration_bucket = if(problem.event.start &amp;lt; now() - 24h, "&amp;gt; 24h")
| fieldsAdd duration_bucket = if(problem.event.start &amp;gt;= now() - 24h, "&amp;lt; 24h", else: duration_bucket)
| fieldsAdd duration_bucket = if(problem.event.start &amp;gt;= now() - 12h, "&amp;lt; 12h", else: duration_bucket)
| fieldsAdd duration_bucket = if(problem.event.start &amp;gt; now() - 1h, "&amp;lt; 1h", else: duration_bucket)
| summarize count = count(), by: { duration_bucket }&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Feb 2024 20:22:24 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Count-of-problem-based-on-duration-its-open-lt-1-hour-lt-12/m-p/236872#M642</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2024-02-12T20:22:24Z</dc:date>
    </item>
  </channel>
</rss>

