<?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 Transform metric to string in Dashboarding</title>
    <link>https://community.dynatrace.com/t5/Dashboarding/Transform-metric-to-string/m-p/208941#M2812</link>
    <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I'm ingesting metrics via api (&lt;A href="https://www.dynatrace.com/support/help/shortlink/api-metrics-v2" target="_self"&gt;Metrics API v2&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;So, I collect a state (&lt;STRONG&gt;string="OK"&lt;/STRONG&gt;) and in the script I change for a (&lt;STRONG&gt;integer = 1&lt;/STRONG&gt;). The unit type im using is &lt;STRONG&gt;State&lt;/STRONG&gt;.&lt;BR /&gt;Now in Dynatrace I would like to transform again the metric to string. I have multiple applications with various states so its hard to follow/memorize all the tansformations &lt;STRONG&gt;String&lt;/STRONG&gt;&amp;lt;--&amp;gt;&lt;STRONG&gt;Integer&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;The challenge that Im facing now is to show the state in a human readable way. I have to create alerts and generate a reasonable dashboard.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Is it possible to convert the integer to string inside Dynatrace to generate friendly dashboards?&amp;nbsp;(i have use cases with 10 states &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;)&lt;/LI&gt;
&lt;LI&gt;If (1.) its not possible I can use the problem app, but the state of application will be Red/Green.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Thanks all,&lt;BR /&gt;RD&lt;/P&gt;</description>
    <pubDate>Mon, 22 May 2023 11:48:36 GMT</pubDate>
    <dc:creator>rdinis</dc:creator>
    <dc:date>2023-05-22T11:48:36Z</dc:date>
    <item>
      <title>Transform metric to string</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Transform-metric-to-string/m-p/208941#M2812</link>
      <description>&lt;P&gt;Hi all,&lt;BR /&gt;&lt;BR /&gt;I'm ingesting metrics via api (&lt;A href="https://www.dynatrace.com/support/help/shortlink/api-metrics-v2" target="_self"&gt;Metrics API v2&lt;/A&gt;).&lt;/P&gt;
&lt;P&gt;So, I collect a state (&lt;STRONG&gt;string="OK"&lt;/STRONG&gt;) and in the script I change for a (&lt;STRONG&gt;integer = 1&lt;/STRONG&gt;). The unit type im using is &lt;STRONG&gt;State&lt;/STRONG&gt;.&lt;BR /&gt;Now in Dynatrace I would like to transform again the metric to string. I have multiple applications with various states so its hard to follow/memorize all the tansformations &lt;STRONG&gt;String&lt;/STRONG&gt;&amp;lt;--&amp;gt;&lt;STRONG&gt;Integer&lt;/STRONG&gt;.&lt;/P&gt;
&lt;P&gt;The challenge that Im facing now is to show the state in a human readable way. I have to create alerts and generate a reasonable dashboard.&lt;/P&gt;
&lt;OL&gt;
&lt;LI&gt;Is it possible to convert the integer to string inside Dynatrace to generate friendly dashboards?&amp;nbsp;(i have use cases with 10 states &lt;span class="lia-unicode-emoji" title=":neutral_face:"&gt;😐&lt;/span&gt;)&lt;/LI&gt;
&lt;LI&gt;If (1.) its not possible I can use the problem app, but the state of application will be Red/Green.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;Thanks all,&lt;BR /&gt;RD&lt;/P&gt;</description>
      <pubDate>Mon, 22 May 2023 11:48:36 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Transform-metric-to-string/m-p/208941#M2812</guid>
      <dc:creator>rdinis</dc:creator>
      <dc:date>2023-05-22T11:48:36Z</dc:date>
    </item>
    <item>
      <title>Re: Transform metric to string</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Transform-metric-to-string/m-p/208991#M2813</link>
      <description>&lt;P&gt;Hey RD,&lt;BR /&gt;&lt;BR /&gt;In my example below I'm ingesting a metric thats random from 1-99 and has a device name as a dimension. You can then use partitions and a table view to display each dimension (in your case application) as being in a different state based on the last value.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Fin_Ubels_0-1680565624800.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/10946i01D5DB750F63A4CC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Fin_Ubels_0-1680565624800.png" alt="Fin_Ubels_0-1680565624800.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;The expression I used is as follows:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;test.metric.average:splitBy("devicename"):last:max:partition("State",value("State10",gt(90)),value("State9",gt(80)),value("State8",gt(70)),value("State7",gt(60)),value("State6",gt(50)),value("State5",gt(40)),value("State4",gt(30)),value("State3",gt(20)),value("State2",gt(10)),value("State1",gt(0))):sort(dimension("devicename",descending))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Apr 2023 23:49:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Transform-metric-to-string/m-p/208991#M2813</guid>
      <dc:creator>Fin_Ubels</dc:creator>
      <dc:date>2023-04-03T23:49:01Z</dc:date>
    </item>
    <item>
      <title>Re: Transform metric to string</title>
      <link>https://community.dynatrace.com/t5/Dashboarding/Transform-metric-to-string/m-p/209031#M2814</link>
      <description>&lt;P&gt;Thank you very much&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/47376"&gt;@Fin_Ubels&lt;/a&gt;, exactly what I needed&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":beaming_face_with_smiling_eyes:"&gt;😁&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 04 Apr 2023 09:27:52 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dashboarding/Transform-metric-to-string/m-p/209031#M2814</guid>
      <dc:creator>rdinis</dc:creator>
      <dc:date>2023-04-04T09:27:52Z</dc:date>
    </item>
  </channel>
</rss>

