<?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: Notebook query in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/210483#M50</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/24856"&gt;@Stephen1_Lee&lt;/a&gt;,&lt;/P&gt;
&lt;P data-unlink="true"&gt;You could try with &lt;EM&gt;matchesValue&amp;nbsp;&lt;/EM&gt;e.g.&lt;/P&gt;
&lt;PRE&gt;fetch events | filter event.kind == "DAVIS_PROBLEM" AND matchesValue(labels.management_zone, "Synthetic")&lt;/PRE&gt;
&lt;P&gt;Please check out the &lt;A href="https://www.dynatrace.com/support/help/observe-and-explore/query-data/dynatrace-query-language/functions#matchesValue" target="_self"&gt;documentation&lt;/A&gt; for more usage examples.&lt;/P&gt;</description>
    <pubDate>Mon, 24 Apr 2023 06:43:33 GMT</pubDate>
    <dc:creator>michal_zawislak</dc:creator>
    <dc:date>2023-04-24T06:43:33Z</dc:date>
    <item>
      <title>Notebook query</title>
      <link>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/210428#M49</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;I can see that event.kind == "DAVIS_PROBLEM" can be used as a filter for notebook events.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But can we also filter on the labels.&lt;/P&gt;
&lt;P&gt;For example in the event, I can see&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;labels.management_zone:&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;Synthetic&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;So can I add a&amp;nbsp; filter expression?&amp;nbsp; I tried (&lt;SPAN class=""&gt;&lt;SPAN class=""&gt;labels.management_zone == "&lt;/SPAN&gt;&lt;/SPAN&gt;Synthetic") but my query returns nothing.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 30 May 2023 10:17:25 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/210428#M49</guid>
      <dc:creator>Stephen1_Lee</dc:creator>
      <dc:date>2023-05-30T10:17:25Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook query</title>
      <link>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/210483#M50</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/24856"&gt;@Stephen1_Lee&lt;/a&gt;,&lt;/P&gt;
&lt;P data-unlink="true"&gt;You could try with &lt;EM&gt;matchesValue&amp;nbsp;&lt;/EM&gt;e.g.&lt;/P&gt;
&lt;PRE&gt;fetch events | filter event.kind == "DAVIS_PROBLEM" AND matchesValue(labels.management_zone, "Synthetic")&lt;/PRE&gt;
&lt;P&gt;Please check out the &lt;A href="https://www.dynatrace.com/support/help/observe-and-explore/query-data/dynatrace-query-language/functions#matchesValue" target="_self"&gt;documentation&lt;/A&gt; for more usage examples.&lt;/P&gt;</description>
      <pubDate>Mon, 24 Apr 2023 06:43:33 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/210483#M50</guid>
      <dc:creator>michal_zawislak</dc:creator>
      <dc:date>2023-04-24T06:43:33Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook query</title>
      <link>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/211117#M51</link>
      <description>&lt;P&gt;hi.&amp;nbsp; the matchesValue works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I as trying to dashboard a barchart of problems per management zone so I could make it into a tile.&lt;/P&gt;&lt;P&gt;Running this over the past 2 hrs only give me 2 records.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fetch events&lt;BR /&gt;| filter (event.kind == "DAVIS_PROBLEM") and matchesValue(labels.management_zone, "EBE")&lt;BR /&gt;| summarize value = count(), by:{display_id,event.status}&lt;BR /&gt;| fields display_id,event.status&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 17:48:26 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/211117#M51</guid>
      <dc:creator>Stephen1_Lee</dc:creator>
      <dc:date>2023-05-01T17:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook query</title>
      <link>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/211118#M52</link>
      <description>&lt;P&gt;but when I go to problems and filter to the same management zone I see 10 active problems.&lt;/P&gt;&lt;P&gt;I would like a dashboard tile of the same bar chart.&lt;/P&gt;</description>
      <pubDate>Mon, 01 May 2023 17:50:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/211118#M52</guid>
      <dc:creator>Stephen1_Lee</dc:creator>
      <dc:date>2023-05-01T17:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook query</title>
      <link>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/211195#M53</link>
      <description>&lt;P&gt;Hi Stephen,&lt;/P&gt;
&lt;P&gt;First, I would like to share with you some info about Davis problems in Grail. Davis problem records in Grail represent snapshots of a problem. So for one problem, there are multiple records and the most recent record for a problem represents the current status of a problem. E.g. here you have a DQL query that shows you the open and close time stamps for problems&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch events
| filter event.kind == "DAVIS_PROBLEM"
| fieldsAdd close_ts = if(event.status == "CLOSED" AND event.status_transition == "RESOLVED",timestamp)
| fieldsAdd open_ts = if(event.status == "ACTIVE" AND event.status_transition == "UPDATED",timestamp)
| filter isNotNull(close_ts) or isNotNull(open_ts)
| summarize 
  open = min(open_ts),
  closed = max(close_ts),
  by:{display_id, event.category, event.name }
| sort open asc&lt;/LI-CODE&gt;
&lt;P&gt;So it might be possible if you query for problems in the last 2h that you don't get all active problems of the last 2 hours. For instance if a problem was opened more than 3 hours ago and there was no update since then.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Unfortunately what you want to achieve, to display number of problems per management zone, is currently not possible with DQL &amp;amp; Grail. The management zone information is stored as array information for a problem. But the team is currently working on a "expand" command which expands arrays to multiple records. With that new command the query will be possible. Expect it to be released within the next couple months.&lt;/P&gt;
&lt;P&gt;Best,&lt;BR /&gt;Sini&lt;/P&gt;</description>
      <pubDate>Tue, 02 May 2023 14:39:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/211195#M53</guid>
      <dc:creator>sinisa_zubic</dc:creator>
      <dc:date>2023-05-02T14:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook query</title>
      <link>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/220991#M209</link>
      <description>&lt;P&gt;Hi Sini,&lt;/P&gt;&lt;P&gt;I am trying to fetch Count of problems raised in each week for each management Zone by using NoteBooks. I was facing issue to apply filter for management zone. Could you please help me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Bhargav Vuyyuru&lt;/P&gt;</description>
      <pubDate>Fri, 18 Aug 2023 06:57:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/220991#M209</guid>
      <dc:creator>Bhargav_314</dc:creator>
      <dc:date>2023-08-18T06:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: Notebook query</title>
      <link>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/245433#M881</link>
      <description>&lt;P&gt;Hi Sinisa,&lt;/P&gt;&lt;P&gt;could I ask you if it is now possible to achive this one?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Unfortunately what you want to achieve, to display number of problems per management zone, is currently not possible with DQL &amp;amp; Grail. The management zone information is stored as array information for a problem. But the team is currently working on a "expand" command which expands arrays to multiple records. With that new command the query will be possible. Expect it to be released within the next couple months.&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;any advice on how to reach this goal? Could you share in case it is now possible an example or docs?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance wish you a good day,&lt;/P&gt;&lt;P&gt;Matteo&lt;/P&gt;</description>
      <pubDate>Mon, 13 May 2024 14:50:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Notebook-query/m-p/245433#M881</guid>
      <dc:creator>andruccioli50</dc:creator>
      <dc:date>2024-05-13T14:50:22Z</dc:date>
    </item>
  </channel>
</rss>

