<?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 Metric anomaly detection for a range of values in the logs in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/Metric-anomaly-detection-for-a-range-of-values-in-the-logs/m-p/254079#M1145</link>
    <description>&lt;P&gt;Attempting to create an Anomaly detection metric event based on a specific range of data from logs.&amp;nbsp;I can find this data from the logs with this DQL query:&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;fetch logs
| filter matchesValue(k8s.namespace.name, "app-namespace") and toLong(application-event-id) &amp;gt;= 100 and toLong(application-event-id) &amp;lt;= 1000
| sort timestamp desc&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;I am creating a Log Metric, that will be used by a Anomaly detection metric event, but the Matcher doesn't allow the range selection: toLong(application-event-id) &amp;gt;= 100 and toLong(application-event-id) &amp;lt;= 1000. I am using this instead:&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;matchesValue(k8s.namespace.name, "app-namespace") and not isNull("application-event-id")&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;Then using an Anomaly detection metric event to raise a Problem if a certain threshold of 100-1000 application-event-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;id are raised in the logs.&lt;/P&gt;
&lt;P&gt;I can filter for a specific application-event-id, but how can I do this for the range of application-event-id in the logs (100 to 1000)&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;log.application_event_ids:filter(eq("application-eventid-id",100))&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;</description>
    <pubDate>Mon, 26 Aug 2024 05:50:27 GMT</pubDate>
    <dc:creator>davidrb</dc:creator>
    <dc:date>2024-08-26T05:50:27Z</dc:date>
    <item>
      <title>Metric anomaly detection for a range of values in the logs</title>
      <link>https://community.dynatrace.com/t5/DQL/Metric-anomaly-detection-for-a-range-of-values-in-the-logs/m-p/254079#M1145</link>
      <description>&lt;P&gt;Attempting to create an Anomaly detection metric event based on a specific range of data from logs.&amp;nbsp;I can find this data from the logs with this DQL query:&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;fetch logs
| filter matchesValue(k8s.namespace.name, "app-namespace") and toLong(application-event-id) &amp;gt;= 100 and toLong(application-event-id) &amp;lt;= 1000
| sort timestamp desc&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;I am creating a Log Metric, that will be used by a Anomaly detection metric event, but the Matcher doesn't allow the range selection: toLong(application-event-id) &amp;gt;= 100 and toLong(application-event-id) &amp;lt;= 1000. I am using this instead:&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;matchesValue(k8s.namespace.name, "app-namespace") and not isNull("application-event-id")&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;Then using an Anomaly detection metric event to raise a Problem if a certain threshold of 100-1000 application-event-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;id are raised in the logs.&lt;/P&gt;
&lt;P&gt;I can filter for a specific application-event-id, but how can I do this for the range of application-event-id in the logs (100 to 1000)&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;log.application_event_ids:filter(eq("application-eventid-id",100))&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;</description>
      <pubDate>Mon, 26 Aug 2024 05:50:27 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Metric-anomaly-detection-for-a-range-of-values-in-the-logs/m-p/254079#M1145</guid>
      <dc:creator>davidrb</dc:creator>
      <dc:date>2024-08-26T05:50:27Z</dc:date>
    </item>
    <item>
      <title>Re: Metric anomaly detection for a range of values in the logs</title>
      <link>https://community.dynatrace.com/t5/DQL/Metric-anomaly-detection-for-a-range-of-values-in-the-logs/m-p/263168#M1460</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/79773"&gt;@davidrb&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;you can use your log query add |makeTimeseries and place it in the Davis Anomaly Detector&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;fetch logs
| filter matchesValue(k8s.namespace.name, "app-namespace") and toLong(application-event-id) &amp;gt;= 100 and toLong(application-event-id) &amp;lt;= 1000
| makeTimeseries count() &lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please give a try, thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;best greetings&lt;/P&gt;
&lt;P&gt;David&lt;/P&gt;</description>
      <pubDate>Thu, 21 Nov 2024 10:20:56 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/Metric-anomaly-detection-for-a-range-of-values-in-the-logs/m-p/263168#M1460</guid>
      <dc:creator>DavidBruendl</dc:creator>
      <dc:date>2024-11-21T10:20:56Z</dc:date>
    </item>
  </channel>
</rss>

