<?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: DQL - Extract value from a metric dimension and convert it to a timeseries metric in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/277583#M2109</link>
    <description>&lt;P&gt;Ooh, this looks promising.&lt;BR /&gt;&lt;BR /&gt;And yeah, I did discover how the metric is expected to be used based on looking at the Metric Event rule that is created when installing the extension, but I still like your version better and I still do not understand why they hard-coded the actual metric to always be 1 instead of just having the metric be the availability state value...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways, thanks and I'll give your idea a try and respond back.&lt;/P&gt;</description>
    <pubDate>Tue, 20 May 2025 12:37:37 GMT</pubDate>
    <dc:creator>36Krazyfists</dc:creator>
    <dc:date>2025-05-20T12:37:37Z</dc:date>
    <item>
      <title>DQL - Extract value from a metric dimension and convert it to a timeseries metric</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/277318#M2089</link>
      <description>&lt;P&gt;For the life of me, I cannot imagine why whomever created the F5 Extension in Dynatrace set the state metrics (for things like Pool State, Pool Member State, etc...) to&amp;nbsp;&lt;EM&gt;always&amp;nbsp;&lt;/EM&gt;be 1 and to have the actual availability state set as a dimension...&lt;/P&gt;
&lt;P&gt;Like, why??&amp;nbsp; The availability state is a number (1 is up, 2 is yellow, 3 is red, and 4 is blue).&amp;nbsp; Why wouldn't they just return that number as the state metric?&amp;nbsp; That would be soooo much easier.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyways, rant over.&lt;/P&gt;
&lt;P&gt;I need to extract the actual availability state number from the &lt;STRONG&gt;pool_member.availstate&lt;/STRONG&gt; dimension of the&amp;nbsp;&lt;STRONG&gt;com.dynatrace.extension.f5.bigip.pool_member.state&lt;/STRONG&gt; metric so that I can create a Davis Anomaly Detector on it.&lt;/P&gt;
&lt;P&gt;Here's the DQL I have so far, but I don't know how to get the availstate dimension out as a metric (I've tried makeTimeSeries but that requires an array of values from the dimension as well as matching start/stop timestamps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;timeseries status=max(com.dynatrace.extension.f5.bigip.pool_member.state), by:{pool_member.name, pool_member.availstate, pool_member.enablestate, pool.name, device.name, device.address}, filter:{pool_member.enablestate == "enabled(1)"}
| lookup [fetch `dt.entity.f5:pool` | fieldsAdd tags | fieldsRename pool.entity_id = id], lookupField:entity.name, sourceField:pool.name
| filter matchesValue(lookup.tags, "Alerting - F5 Pool Member Availability:True")
| fieldsAdd availstate = parse(pool_member.availstate, """LD '(' INTEGER:availstate ')' EOF """)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Is this possible?&amp;nbsp; We basically want to setup a DAD to alert when the pool member &lt;STRONG&gt;availstate&lt;/STRONG&gt; is greater than 1 for a while basically.&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 08:50:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/277318#M2089</guid>
      <dc:creator>36Krazyfists</dc:creator>
      <dc:date>2025-05-16T08:50:01Z</dc:date>
    </item>
    <item>
      <title>Re: DQL - Extract value from a metric dimension and convert it to a timeseries metric</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/277421#M2093</link>
      <description>&lt;P&gt;Instead of splitting by pool_member.availstate, you can filter upfront to only include data points for "unhealthy" values where the dimension value is unequal to&amp;nbsp;"green(1)". Combine this with the 'default:0' parameter to create a situation where you'll get a value of '0' for healthy and '1' for unhealthy. You would also ditch the last line where the availstate is being parsed, since that info is no longer needed.&lt;/P&gt;&lt;P&gt;The new DQL would look something like this (formatted for ease of reading):&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;timeseries unhealthy=max(com.dynatrace.extension.f5.bigip.pool_member.state, 
                          filter: pool_member.availstate != "green(1)", 
                          default: 0), 
           by:{
                pool_member.name,  
                pool_member.enablestate, 
                pool.name, device.name, 
                device.address
              }, 
           filter:{ pool_member.enablestate == "enabled(1)" }
| lookup [fetch `dt.entity.f5:pool` 
          | fieldsAdd tags 
          | fieldsRename pool.entity_id = id],
          lookupField:entity.name, 
          sourceField:pool.name
| filter matchesValue(lookup.tags, "Alerting - F5 Pool Member Availability:True")&lt;/LI-CODE&gt;&lt;P&gt;I hope that helps &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 16 May 2025 22:17:57 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/277421#M2093</guid>
      <dc:creator>marco_irmer</dc:creator>
      <dc:date>2025-05-16T22:17:57Z</dc:date>
    </item>
    <item>
      <title>Re: DQL - Extract value from a metric dimension and convert it to a timeseries metric</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/277583#M2109</link>
      <description>&lt;P&gt;Ooh, this looks promising.&lt;BR /&gt;&lt;BR /&gt;And yeah, I did discover how the metric is expected to be used based on looking at the Metric Event rule that is created when installing the extension, but I still like your version better and I still do not understand why they hard-coded the actual metric to always be 1 instead of just having the metric be the availability state value...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Anyways, thanks and I'll give your idea a try and respond back.&lt;/P&gt;</description>
      <pubDate>Tue, 20 May 2025 12:37:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/277583#M2109</guid>
      <dc:creator>36Krazyfists</dc:creator>
      <dc:date>2025-05-20T12:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: DQL - Extract value from a metric dimension and convert it to a timeseries metric</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/295558#M3184</link>
      <description>&lt;P&gt;Funny, I came across this post trying to figure out how to do the same thing because of the same 'issue' with the F5 extension.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 14:51:14 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/295558#M3184</guid>
      <dc:creator>Joseph_Hobbs</dc:creator>
      <dc:date>2026-03-03T14:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: DQL - Extract value from a metric dimension and convert it to a timeseries metric</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/297681#M3267</link>
      <description>&lt;P&gt;Yeah, I feel like they could have just set it up so that the metric returns the Availability state as the value (so 1 if Green, 2 if yellow, and 3 if red).&amp;nbsp; Then, we could have binary alerts where if greater than 1, it's bad, equal to 1, it's good.&amp;nbsp; Or, we could have more specific alerts based on the value.&lt;/P&gt;&lt;P&gt;The whole thing where the metric returns a 1 at all times and then we have to use weird filters and tricks to get an actual value out of it is really annoying.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Apr 2026 19:39:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-Extract-value-from-a-metric-dimension-and-convert-it-to-a/m-p/297681#M3267</guid>
      <dc:creator>36Krazyfists</dc:creator>
      <dc:date>2026-04-14T19:39:39Z</dc:date>
    </item>
  </channel>
</rss>

