<?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 Create a custom metrics from DQL query and send a message on Microsoft Teams in Automations</title>
    <link>https://community.dynatrace.com/t5/Automations/Create-a-custom-metrics-from-DQL-query-and-send-a-message-on/m-p/294017#M2488</link>
    <description>&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I’m looking for guidance on how to create a custom metric in Dynatrace with DQL query&amp;nbsp; and then use the result to send a notification/post to Microsoft Teams&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;If you have examples, best practices, or links to relevant documentation, I’d really appreciate it.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;Mardock&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Tue, 03 Feb 2026 07:32:17 GMT</pubDate>
    <dc:creator>Mardock</dc:creator>
    <dc:date>2026-02-03T07:32:17Z</dc:date>
    <item>
      <title>Create a custom metrics from DQL query and send a message on Microsoft Teams</title>
      <link>https://community.dynatrace.com/t5/Automations/Create-a-custom-metrics-from-DQL-query-and-send-a-message-on/m-p/294017#M2488</link>
      <description>&lt;DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Hi everyone,&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;I’m looking for guidance on how to create a custom metric in Dynatrace with DQL query&amp;nbsp; and then use the result to send a notification/post to Microsoft Teams&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;If you have examples, best practices, or links to relevant documentation, I’d really appreciate it.&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;SPAN&gt;Thanks in advance!&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;BR /&gt;
&lt;DIV&gt;&lt;SPAN&gt;Mardock&lt;/SPAN&gt;&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Feb 2026 07:32:17 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Create-a-custom-metrics-from-DQL-query-and-send-a-message-on/m-p/294017#M2488</guid>
      <dc:creator>Mardock</dc:creator>
      <dc:date>2026-02-03T07:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create a custom metrics from DQL query and send a message on Microsoft Teams</title>
      <link>https://community.dynatrace.com/t5/Automations/Create-a-custom-metrics-from-DQL-query-and-send-a-message-on/m-p/294034#M2489</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;I think that you&amp;nbsp;can’t directly “push” the result of a DQL query to Microsoft Teams, but&amp;nbsp;There are two supported ways to achieve this in Dynatrace, depending on whether you really need a stored custom metric or just want to use DQL results to post to Teams.&lt;BR /&gt;If your DQL is based on logs,&amp;nbsp;create a log metric using DQL matchers, then alert on that metric using Metric events, and finally send the notification to Microsoft Teams.&lt;BR /&gt;1.&amp;nbsp;Settings → Log Monitoring → Metrics extraction → Add log metric). This uses a DQL-based matcher&lt;BR /&gt;&lt;A href="https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-processing/lma-log-metrics" target="_blank"&gt;https://docs.dynatrace.com/docs/analyze-explore-automate/logs/lma-log-processing/lma-log-metrics&lt;/A&gt;&lt;BR /&gt;2. Create alerting using Metric events&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/dynatrace-intelligence/anomaly-detection/metric-events" target="_blank"&gt;https://docs.dynatrace.com/docs/dynatrace-intelligence/anomaly-detection/metric-events&lt;/A&gt;&lt;BR /&gt;3. Send to Teams using webhook.&lt;BR /&gt;&lt;BR /&gt;On the other hand, ifyour goal is simply “run a DQL query and post the result to Teams”, you can do it directly with Workflows.&amp;nbsp;Use Workflows action: Execute DQL Query to run your query and get results for subsequent steps&lt;BR /&gt;&lt;A href="https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/default-workflow-actions/dql-query-workflow-action" target="_blank"&gt;https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/default-workflow-actions/dql-query-workflow-action&lt;/A&gt;&lt;BR /&gt;and add Microsoft Teams Connector → Send message and format the message&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/actions/microsoft-teams" target="_blank"&gt;https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/actions/microsoft-teams&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Feb 2026 15:59:47 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Automations/Create-a-custom-metrics-from-DQL-query-and-send-a-message-on/m-p/294034#M2489</guid>
      <dc:creator>t_pawlak</dc:creator>
      <dc:date>2026-02-02T15:59:47Z</dc:date>
    </item>
  </channel>
</rss>

