<?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: How to use ENUM in code while building a dashboard? in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/How-to-use-ENUM-in-code-while-building-a-dashboard/m-p/232162#M3540</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/54091"&gt;@TomLichti&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Have you found the answer to your question already? If not - let me know, I'll try to find someone to assist you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Dec 2023 09:36:23 GMT</pubDate>
    <dc:creator>IzabelaRokita</dc:creator>
    <dc:date>2023-12-18T09:36:23Z</dc:date>
    <item>
      <title>How to use ENUM in code while building a dashboard?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-use-ENUM-in-code-while-building-a-dashboard/m-p/223652#M3259</link>
      <description>&lt;P&gt;&lt;SPAN&gt;I asked this in the Dev Q&amp;amp;A forum, but this forum might have more visibility.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;As a test use case I am building a dashboard that lists problems, with a Severity variable. I have done it successfully using a CSV list of the Severity Levels, but in the API there is an existing ENUM of the levels called&amp;nbsp;ProblemSeverityLevel which should have all of them, but I can't figure out how to use that in code. If I reference if from the problemsClient, it just returns null, or invalid reference, depending on how I try to use it. Is it possible to reference the ENUM so I can then list the values into the variable via code?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 09:34:11 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-use-ENUM-in-code-while-building-a-dashboard/m-p/223652#M3259</guid>
      <dc:creator>TomLichti</dc:creator>
      <dc:date>2023-12-18T09:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ENUM in code while building a dashboard?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-use-ENUM-in-code-while-building-a-dashboard/m-p/232162#M3540</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/54091"&gt;@TomLichti&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;Have you found the answer to your question already? If not - let me know, I'll try to find someone to assist you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 09:36:23 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-use-ENUM-in-code-while-building-a-dashboard/m-p/232162#M3540</guid>
      <dc:creator>IzabelaRokita</dc:creator>
      <dc:date>2023-12-18T09:36:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to use ENUM in code while building a dashboard?</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/How-to-use-ENUM-in-code-while-building-a-dashboard/m-p/233826#M3599</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/54091"&gt;@TomLichti&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Dynatrace Severities are -&amp;nbsp;Availability, Error, Slowdown, Resource, Custom&lt;/P&gt;&lt;P&gt;Have you tried this using DQL?&lt;/P&gt;&lt;P&gt;This DQL snippet will give you a summary of problems by severity&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch events
| filter event.kind == "DAVIS_PROBLEM"
| summarize CurrentTime = takeLast(timestamp), by:{display_id, event.category}
| summarize ProblemCount = countDistinct(display_id),by:{event.category}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LawrenceBarratt_0-1704835640961.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16705iE26F9E37DD2A2519/image-size/large?v=v2&amp;amp;px=999" role="button" title="LawrenceBarratt_0-1704835640961.png" alt="LawrenceBarratt_0-1704835640961.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Remove the last line and it will give you a list of problems with their most recent event status&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch events
| filter event.kind == "DAVIS_PROBLEM"
| summarize CurrentTime = takeLast(timestamp), by:{display_id, event.category}
//| summarize ProblemCount = countDistinct(display_id),by:{event.category}&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LawrenceBarratt_1-1704835750013.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16706i28110CD4A011249C/image-size/large?v=v2&amp;amp;px=999" role="button" title="LawrenceBarratt_1-1704835750013.png" alt="LawrenceBarratt_1-1704835750013.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Add this to a dashboard and you can use the below DQL snippets for the variable and filter by event.category&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;// Dashboard Variable
fetch events
| filter event.kind == "DAVIS_PROBLEM"
| summarize CurrentTime = takeLast(timestamp), by:{display_id, event.category}
| summarize ProblemCount = countDistinct(display_id),by:{event.category}
| fields event.category&lt;/LI-CODE&gt;&lt;LI-CODE lang="markup"&gt;//DQL Query Tile
fetch events
| filter event.kind == "DAVIS_PROBLEM"
| summarize CurrentTime = takeLast(timestamp), by:{display_id, event.category}
| filter in(event.category, array($Severity))&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LawrenceBarratt_3-1704836006068.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16708iBA43F348690BB62B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="LawrenceBarratt_3-1704836006068.png" alt="LawrenceBarratt_3-1704836006068.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="LawrenceBarratt_2-1704835994038.png" style="width: 999px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/16707iE860A3F3558EC956/image-size/large?v=v2&amp;amp;px=999" role="button" title="LawrenceBarratt_2-1704835994038.png" alt="LawrenceBarratt_2-1704835994038.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Let me know if you have any further questions.&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Lawrence&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jan 2024 21:34:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/How-to-use-ENUM-in-code-while-building-a-dashboard/m-p/233826#M3599</guid>
      <dc:creator>LawrenceBarratt</dc:creator>
      <dc:date>2024-01-09T21:34:31Z</dc:date>
    </item>
  </channel>
</rss>

