<?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 Why does metrics API try to apply filter to a dimensionless metric? in Dynatrace API</title>
    <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/183224#M1776</link>
    <description>&lt;P&gt;I have a problem trying to configure alerting (custom anomaly detection) where the calculation includes one dimensionless metric and another with the wished dimensions. The same metric expression works great in Data explorer and dashboards but not in alerting because the metrics API tries to apply the filter also to the dimensionless metric.&lt;BR /&gt;&lt;BR /&gt;The metric expression uses Prometheus metrics exposed by cert-manager like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(certmanager_certificate_renewal_timestamp_seconds:splitBy("name","namespace","k8s.deployment.name","dt.entity.kubernetes_cluster")/86400)-(certmanager_clock_time_seconds_gauge:splitBy()/86400)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I have checked the Dynatrace server logs and the actual alerting component queries metrics API for each combination with selector as this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;((certmanager_certificate_renewal_timestamp_seconds:splitBy(name,namespace,\"k8s.deployment.name\",\"dt.entity.kubernetes_cluster\")/86400)-(certmanager_clock_time_seconds_gauge:splitBy()/86400)):filter(eq(\"dt.entity.kubernetes_cluster\",KUBERNETES_CLUSTER-4F32D9E28C22C7F1),eq(\"k8s.deployment.name\",cert-manager),eq(name,test-cert),eq(namespace,test-namespace))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If I try that query in Data explorer it fails because it tries to apply the filter also to that dimensionless metric "certmanager_clock_time_seconds_gauge:splitBy()" - it's made dimensionless with that empty splitBy.&lt;BR /&gt;&lt;BR /&gt;I'm just wondering why does Dynatrace even try to apply a filter to a dimensionless metric because it would always fail?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Mar 2022 09:23:00 GMT</pubDate>
    <dc:creator>ext-Antti_Elonh</dc:creator>
    <dc:date>2022-03-25T09:23:00Z</dc:date>
    <item>
      <title>Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/183224#M1776</link>
      <description>&lt;P&gt;I have a problem trying to configure alerting (custom anomaly detection) where the calculation includes one dimensionless metric and another with the wished dimensions. The same metric expression works great in Data explorer and dashboards but not in alerting because the metrics API tries to apply the filter also to the dimensionless metric.&lt;BR /&gt;&lt;BR /&gt;The metric expression uses Prometheus metrics exposed by cert-manager like this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;(certmanager_certificate_renewal_timestamp_seconds:splitBy("name","namespace","k8s.deployment.name","dt.entity.kubernetes_cluster")/86400)-(certmanager_clock_time_seconds_gauge:splitBy()/86400)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;BR /&gt;I have checked the Dynatrace server logs and the actual alerting component queries metrics API for each combination with selector as this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;((certmanager_certificate_renewal_timestamp_seconds:splitBy(name,namespace,\"k8s.deployment.name\",\"dt.entity.kubernetes_cluster\")/86400)-(certmanager_clock_time_seconds_gauge:splitBy()/86400)):filter(eq(\"dt.entity.kubernetes_cluster\",KUBERNETES_CLUSTER-4F32D9E28C22C7F1),eq(\"k8s.deployment.name\",cert-manager),eq(name,test-cert),eq(namespace,test-namespace))&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;If I try that query in Data explorer it fails because it tries to apply the filter also to that dimensionless metric "certmanager_clock_time_seconds_gauge:splitBy()" - it's made dimensionless with that empty splitBy.&lt;BR /&gt;&lt;BR /&gt;I'm just wondering why does Dynatrace even try to apply a filter to a dimensionless metric because it would always fail?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Mar 2022 09:23:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/183224#M1776</guid>
      <dc:creator>ext-Antti_Elonh</dc:creator>
      <dc:date>2022-03-25T09:23:00Z</dc:date>
    </item>
    <item>
      <title>Re: Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/183228#M1777</link>
      <description>&lt;P&gt;Yes that is a bug we recently encountered in the alerting module. We are working on a fix.&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 11:34:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/183228#M1777</guid>
      <dc:creator>wolfgang_beer</dc:creator>
      <dc:date>2022-03-24T11:34:55Z</dc:date>
    </item>
    <item>
      <title>Re: Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/183264#M1778</link>
      <description>&lt;P&gt;I understand that this can be fixed in the alerting module also but I think there should be a fix in the metrics API as well.&lt;BR /&gt;&lt;BR /&gt;The documentation basically says that a fixed number and a dimensionless metric behave similarly (creating tuples etc.) except that a dimensionless metric is a series. They still don't behave the same regarding that filter transformation. I think they should both be excluded from filter transformation and it might have solved the issue also in this other topic: &lt;A href="https://community.dynatrace.com/t5/Dashboarding/I-can-t-create-latency-SLO-using-calculated-metric/m-p/176085" target="_blank"&gt;https://community.dynatrace.com/t5/Dashboarding/I-can-t-create-latency-SLO-using-calculated-metric/m-p/176085&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 13:12:37 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/183264#M1778</guid>
      <dc:creator>ext-Antti_Elonh</dc:creator>
      <dc:date>2022-03-24T13:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/183277#M1779</link>
      <description>&lt;P&gt;Yes sorry I was not precise enough. We are working on a fix at the moment and the fix is done in the metric query subsystem that includes a fix on API as well as on alerting.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best greetings,&lt;/P&gt;
&lt;P&gt;Wolfgang&lt;/P&gt;</description>
      <pubDate>Thu, 24 Mar 2022 15:03:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/183277#M1779</guid>
      <dc:creator>wolfgang_beer</dc:creator>
      <dc:date>2022-03-24T15:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/185795#M1861</link>
      <description>&lt;P&gt;Hi, &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/8624"&gt;@wolfgang_beer&lt;/a&gt; . Could you tell in which version of a Managed Dynatrace can we expect the fix?&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 08:10:07 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/185795#M1861</guid>
      <dc:creator>ext-Antti_Elonh</dc:creator>
      <dc:date>2022-05-02T08:10:07Z</dc:date>
    </item>
    <item>
      <title>Re: Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/185799#M1862</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/2211"&gt;@ext-Antti_Elonh&lt;/a&gt;&amp;nbsp;there are 2 topics still upcoming for DT Managed support which are:&lt;/P&gt;
&lt;P&gt;- View the list of problems (precondition is Managed Release 240)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;- Push notifications for Managed Environments (expect that in Mai)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best greetings,&lt;/P&gt;
&lt;P&gt;Wolfgang&lt;/P&gt;</description>
      <pubDate>Mon, 02 May 2022 09:01:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/185799#M1862</guid>
      <dc:creator>wolfgang_beer</dc:creator>
      <dc:date>2022-05-02T09:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/185869#M1865</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I was wondering about the fix to metric query problem in anomaly detection.&lt;/P&gt;</description>
      <pubDate>Tue, 03 May 2022 10:09:13 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/185869#M1865</guid>
      <dc:creator>ext-Antti_Elonh</dc:creator>
      <dc:date>2022-05-03T10:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/186182#M1871</link>
      <description>&lt;P&gt;According to what I see from dev side, this reported issue was fixed with Dynatrace release 239.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best greetings,&lt;/P&gt;
&lt;P&gt;Wolfgang&lt;/P&gt;</description>
      <pubDate>Tue, 10 May 2022 08:15:05 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/186182#M1871</guid>
      <dc:creator>wolfgang_beer</dc:creator>
      <dc:date>2022-05-10T08:15:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/187200#M1908</link>
      <description>&lt;P&gt;Our managed cluster was updated to v1.240 last night and these custom alerts started to work as expected.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 13:56:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/187200#M1908</guid>
      <dc:creator>ext-Antti_Elonh</dc:creator>
      <dc:date>2022-05-25T13:56:09Z</dc:date>
    </item>
    <item>
      <title>Re: Why does metrics API try to apply filter to a dimensionless metric?</title>
      <link>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/187362#M1910</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/2211"&gt;@ext-Antti_Elonh&lt;/a&gt;&amp;nbsp;Excellent, many thanks for sharing this confirmation with us!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best greetings,&lt;/P&gt;
&lt;P&gt;Wolfgang&lt;/P&gt;</description>
      <pubDate>Mon, 30 May 2022 05:51:19 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Dynatrace-API/Why-does-metrics-API-try-to-apply-filter-to-a-dimensionless/m-p/187362#M1910</guid>
      <dc:creator>wolfgang_beer</dc:creator>
      <dc:date>2022-05-30T05:51:19Z</dc:date>
    </item>
  </channel>
</rss>

