<?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 DQL alert if log content is not found in DQL</title>
    <link>https://community.dynatrace.com/t5/DQL/DQL-alert-if-log-content-is-not-found/m-p/279418#M2203</link>
    <description>&lt;P&gt;I'm trying to create 1 single alert (rather than 3 different ones) to alert if a particular log message is not found in my lambda log. I plan to run this via a workflow daily to alert if the message is not found for that day.&lt;/P&gt;&lt;P&gt;What I so far is below which will show me the log group and the count for when the message is found but what I am seeing is that if the message is not found then there is no record shown for that log group, see sample below. My query has 3 log groups but my result shows only 2 log groups because 'Successfully updated number of accounts:' was not found in log-group-3.&amp;nbsp; Any thoughts on how I can get around this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs,from:-24h
| filter (matchesPhrase(content, "Successfully deleted profile count:") AND (aws.log_group == "/aws/lambda/log-group-1" OR aws.log_group == "/aws/lambda/log-group-2")) OR matchesPhrase(content, "Successfully updated number of accounts:") AND aws.log_group == "/aws/lambda/log-group-3"
| summarize count = count(), by:{aws.log_group}
| fieldsAdd non_zero_count = if(count != 0, 0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample output&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_0-1749837983949.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28488i1DA8A432327FAF99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_0-1749837983949.png" alt="sivart_89_0-1749837983949.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 13 Jun 2025 18:10:08 GMT</pubDate>
    <dc:creator>sivart_89</dc:creator>
    <dc:date>2025-06-13T18:10:08Z</dc:date>
    <item>
      <title>DQL alert if log content is not found</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-alert-if-log-content-is-not-found/m-p/279418#M2203</link>
      <description>&lt;P&gt;I'm trying to create 1 single alert (rather than 3 different ones) to alert if a particular log message is not found in my lambda log. I plan to run this via a workflow daily to alert if the message is not found for that day.&lt;/P&gt;&lt;P&gt;What I so far is below which will show me the log group and the count for when the message is found but what I am seeing is that if the message is not found then there is no record shown for that log group, see sample below. My query has 3 log groups but my result shows only 2 log groups because 'Successfully updated number of accounts:' was not found in log-group-3.&amp;nbsp; Any thoughts on how I can get around this?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs,from:-24h
| filter (matchesPhrase(content, "Successfully deleted profile count:") AND (aws.log_group == "/aws/lambda/log-group-1" OR aws.log_group == "/aws/lambda/log-group-2")) OR matchesPhrase(content, "Successfully updated number of accounts:") AND aws.log_group == "/aws/lambda/log-group-3"
| summarize count = count(), by:{aws.log_group}
| fieldsAdd non_zero_count = if(count != 0, 0)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Sample output&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sivart_89_0-1749837983949.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/28488i1DA8A432327FAF99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sivart_89_0-1749837983949.png" alt="sivart_89_0-1749837983949.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2025 18:10:08 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-alert-if-log-content-is-not-found/m-p/279418#M2203</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2025-06-13T18:10:08Z</dc:date>
    </item>
    <item>
      <title>Re: DQL alert if log content is not found</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-alert-if-log-content-is-not-found/m-p/279449#M2208</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/17361"&gt;@sivart_89&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Just a quick thought, can we convert this into a time series using makeTimeseries, and trigger an alert if there’s no data or the value is zero? Would that work here?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;</description>
      <pubDate>Sat, 14 Jun 2025 04:35:58 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-alert-if-log-content-is-not-found/m-p/279449#M2208</guid>
      <dc:creator>Akhil-Jayendran</dc:creator>
      <dc:date>2025-06-14T04:35:58Z</dc:date>
    </item>
    <item>
      <title>Re: DQL alert if log content is not found</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-alert-if-log-content-is-not-found/m-p/279523#M2209</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/52584"&gt;@Akhil-Jayendran&lt;/a&gt;&amp;nbsp;for the suggestion, I honestly did not even think of that. I'm trying this out but instead of getting datapoints of 0 I am getting a 'There are not records' message. I'm trying something like the below, still looking into this.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs,from:-24h
| filter (matchesPhrase(content, "Successfully deleted profile count:") AND (aws.log_group == "lambda-1" OR aws.log_group == "lambda-2")) OR (matchesPhrase(content, "Successfully updated number of accounts:") AND aws.log_group == "lambda-3") OR (matchesPhrase(content, "Successfully deleted x accounts when running unregistered profile cleanup") OR matchesPhrase(content, "Successfully deleted x profiles when running unregistered profile cleanup") AND aws.log_group == "lambda-4")
| makeTimeseries count(default: 0), interval: 1m&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 16 Jun 2025 12:32:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-alert-if-log-content-is-not-found/m-p/279523#M2209</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2025-06-16T12:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: DQL alert if log content is not found</title>
      <link>https://community.dynatrace.com/t5/DQL/DQL-alert-if-log-content-is-not-found/m-p/279524#M2210</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/52584"&gt;@Akhil-Jayendran&lt;/a&gt;&amp;nbsp;found the issue, it was with the parenthesis. What I am running into now is when running this via a workflow I get the below response. The value of 14 is correct as there was 14 instances found but I need to tweak it to essentially create a problem card if there are no nonzero datapoints.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;[
  {
    "interval": "1800000000000",
    "timeframe": {
      "end": "2025-06-16T13:00:00.000Z",
      "start": "2025-06-14T12:30:00.000Z"
    },
    "count(default:0)": [
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      14,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      14,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0,
      0
    ]
  }
]&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Jun 2025 12:53:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/DQL/DQL-alert-if-log-content-is-not-found/m-p/279524#M2210</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2025-06-16T12:53:21Z</dc:date>
    </item>
  </channel>
</rss>

