<?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: Creating metric with multiple matchers in Log Analytics</title>
    <link>https://community.dynatrace.com/t5/Log-Analytics/Creating-metric-with-multiple-matchers/m-p/296752#M1550</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe using Openpipeline + metric extraction. You have an example &lt;A title="here" href="https://docs.dynatrace.com/docs/shortlink/openpipeline-log-processing" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
    <pubDate>Thu, 26 Mar 2026 14:58:54 GMT</pubDate>
    <dc:creator>AntonPineiro</dc:creator>
    <dc:date>2026-03-26T14:58:54Z</dc:date>
    <item>
      <title>Creating metric with multiple matchers</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Creating-metric-with-multiple-matchers/m-p/296749#M1549</link>
      <description>&lt;P&gt;Hi Team,&lt;/P&gt;&lt;P&gt;I am in the process of cleaning up some of our custom alerts and dashboards by converting things into metrics but wanted to see what the best practices are when there are multiple matchers for the query. An example query would be :&lt;/P&gt;&lt;P&gt;fetch logs&lt;BR /&gt;| filter k8s.container.name == "x"&lt;BR /&gt;and k8s.namespace.name == "y" and matchesPhrase(content, "z") or matchesPhrase(content, "z2") or matchesPhrase(content, "z3")&lt;BR /&gt;| summarize count()&lt;/P&gt;&lt;P&gt;would it be best to create a separate metric for each matchesPhrase option or is there a proper way to make this into one metric for a simple log count?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for any input or suggestions&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2026 13:44:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Creating-metric-with-multiple-matchers/m-p/296749#M1549</guid>
      <dc:creator>Joe_Kulesza</dc:creator>
      <dc:date>2026-03-26T13:44:17Z</dc:date>
    </item>
    <item>
      <title>Re: Creating metric with multiple matchers</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Creating-metric-with-multiple-matchers/m-p/296752#M1550</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Maybe using Openpipeline + metric extraction. You have an example &lt;A title="here" href="https://docs.dynatrace.com/docs/shortlink/openpipeline-log-processing" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2026 14:58:54 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Creating-metric-with-multiple-matchers/m-p/296752#M1550</guid>
      <dc:creator>AntonPineiro</dc:creator>
      <dc:date>2026-03-26T14:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating metric with multiple matchers</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/Creating-metric-with-multiple-matchers/m-p/296764#M1551</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;that makes sense.&lt;/P&gt;&lt;P&gt;But I think the answer depends on the goal:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if the requirement is just to count matching logs in DQL, then a single query/metric with grouped OR conditions is enough, for example:&lt;/LI&gt;&lt;/UL&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter k8s.cluster.name == "gke-live"
  and k8s.namespace.name == "online-boutique"
  and (
    matchesPhrase(content, "4cefce565e791b2f")
    or matchesPhrase(content, "acf295bf59a432028d879e50cf4b6674")
  )
| summarize count()&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="logs.jpg" style="width: 727px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/32482i1F87EE4EC166D082/image-size/large?v=v2&amp;amp;px=999" role="button" title="logs.jpg" alt="logs.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;if the goal is long-term monitoring, dashboarding, or alerting, then OpenPipeline + metric extraction is probably the better approach, because Dynatrace supports extracting metrics from logs during ingest and routing data through dedicated log pipelines.&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-processing/lma-openpipeline" target="_self"&gt;Log processing with OpenPipeline&lt;/A&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2026 16:24:04 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/Creating-metric-with-multiple-matchers/m-p/296764#M1551</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2026-03-26T16:24:04Z</dc:date>
    </item>
  </channel>
</rss>

