<?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: How to identify the list of servers exhibiting a specific high-volume logging behaviour? in Log Analytics</title>
    <link>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266606#M1160</link>
    <description>&lt;P&gt;Hey &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/84888"&gt;@Aaron_L&lt;/a&gt; ,&lt;BR /&gt;One thing to keep in mind is that in Dynatrace Query Language the division between two integer values is an integer, which gets rid of any decimal portion.&lt;BR /&gt;Easy straightforward solution to this is just to cast both variabels to double:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter contains(content, "bypass")
| summarize TotalLogLines = count(), MyAppLogLines = countif(dt.process.name == "MyApp.exe"), by:{host.name}
| fieldsAdd MyAppPercent = round((toDouble(MyAppLogLines)/toDouble(TotalLogLines))*100, decimals:2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A different less spaghetti code solution is also to just multiply one of the variables by 1.0, which makes the result not an integer.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter contains(content, "bypass")
| summarize TotalLogLines = count(), MyAppLogLines = countif(dt.process.name == "MyApp.exe"), by:{host.name}
| fieldsAdd MyAppPercent = round(( (1.0*MyAppLogLines)/TotalLogLines)*100, decimals:2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See if either works for you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Jan 2025 11:04:22 GMT</pubDate>
    <dc:creator>PedroSantos</dc:creator>
    <dc:date>2025-01-03T11:04:22Z</dc:date>
    <item>
      <title>How to identify the list of servers exhibiting a specific high-volume logging behaviour?</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266392#M1153</link>
      <description>&lt;P&gt;We are seeing that on a subset of our servers, a specific process is generating a very large number of log records containing a specific keyword "bypass".&lt;/P&gt;
&lt;P&gt;How would I produce a list/chart of only the servers that have reported an average of more than 1000 lines/hour containing this keyword, and the total # of log lines with the keyword, over the past 5 days?&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Aaron&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jan 2025 13:41:21 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266392#M1153</guid>
      <dc:creator>Aaron_L</dc:creator>
      <dc:date>2025-01-07T13:41:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify the list of servers exhibiting a specific high-volume logging behaviour?</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266399#M1154</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/84888"&gt;@Aaron_L&lt;/a&gt; ,&lt;/P&gt;&lt;P&gt;A quick way that might help you achieve your objective is setting up a notebook and running this DQL query:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter matchesPhrase(content, "bypass")
| summarize count(), by:{Host = dt.entity.host}
| sort `count()` desc&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This will fetch all logs, find the ones with "bypass" in content, and display the number of logs per host sorted by desc.&lt;/P&gt;&lt;P&gt;It will provide a table similar to this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PedroSantos_0-1735657949970.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/25517i28DEB97589290382/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PedroSantos_0-1735657949970.png" alt="PedroSantos_0-1735657949970.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(this one is from the demo live environment)&lt;/P&gt;&lt;P&gt;Note that this &lt;U&gt;does not provide an average of lines/hr&lt;/U&gt;, but the total count of lines with "bypass" per host within your selected timeframe. Naturally, the Hosts with more lines per hour will still very likely rank higher on the list of total count.&amp;nbsp; So this can still be used to identify the list of servers exhibiting this specific high-volume logging behavior.&lt;/P&gt;&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;&lt;P&gt;And keep in mind that, on Notebooks, you can always make use of the timeframe selector to adjust to your needs and specific hours:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="PedroSantos_1-1735658101805.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/25518iC4BABEA8ADCD647F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="PedroSantos_1-1735658101805.png" alt="PedroSantos_1-1735658101805.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;(I used last 2 hours)&lt;/P&gt;&lt;P&gt;Lastly, if you're planning on having a dashboard with this query it might be worth to look into bucket assignment and optimize the query to look into specific buckets.&lt;/P&gt;&lt;P&gt;Let me know if this helps you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 31 Dec 2024 15:20:29 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266399#M1154</guid>
      <dc:creator>PedroSantos</dc:creator>
      <dc:date>2024-12-31T15:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify the list of servers exhibiting a specific high-volume logging behaviour?</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266581#M1159</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/77112"&gt;@PedroSantos&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for your suggestion.&amp;nbsp; I've updated the query a bit, as I want to calculate the percentage of log lines containing the specific keyword that come from one executable.&amp;nbsp; Unfortunately, the new column I'm adding with fieldsAdd does not appear to function as I expect - I always get a 0 in the column.&lt;BR /&gt;Here is my current query:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter contains(content, "bypass")
| summarize TotalLogLines = count(), MyAppLogLines = countif(dt.process.name == "MyApp.exe"), by:{host.name}
| fieldsAdd MyAppPercent = round((MyAppLogLines/TotalLogLines)*100, decimals:2)&lt;/LI-CODE&gt;&lt;P&gt;Any thoughts?&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Aaron&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jan 2025 22:17:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266581#M1159</guid>
      <dc:creator>Aaron_L</dc:creator>
      <dc:date>2025-01-02T22:17:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify the list of servers exhibiting a specific high-volume logging behaviour?</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266606#M1160</link>
      <description>&lt;P&gt;Hey &lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/84888"&gt;@Aaron_L&lt;/a&gt; ,&lt;BR /&gt;One thing to keep in mind is that in Dynatrace Query Language the division between two integer values is an integer, which gets rid of any decimal portion.&lt;BR /&gt;Easy straightforward solution to this is just to cast both variabels to double:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter contains(content, "bypass")
| summarize TotalLogLines = count(), MyAppLogLines = countif(dt.process.name == "MyApp.exe"), by:{host.name}
| fieldsAdd MyAppPercent = round((toDouble(MyAppLogLines)/toDouble(TotalLogLines))*100, decimals:2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;A different less spaghetti code solution is also to just multiply one of the variables by 1.0, which makes the result not an integer.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;fetch logs
| filter contains(content, "bypass")
| summarize TotalLogLines = count(), MyAppLogLines = countif(dt.process.name == "MyApp.exe"), by:{host.name}
| fieldsAdd MyAppPercent = round(( (1.0*MyAppLogLines)/TotalLogLines)*100, decimals:2)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See if either works for you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 11:04:22 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266606#M1160</guid>
      <dc:creator>PedroSantos</dc:creator>
      <dc:date>2025-01-03T11:04:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to identify the list of servers exhibiting a specific high-volume logging behaviour?</title>
      <link>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266653#M1164</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/77112"&gt;@PedroSantos&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Thanks for the quick response.&amp;nbsp; The &lt;FONT face="courier new,courier"&gt;toDouble()&lt;/FONT&gt; option worked well, and like the &lt;FONT face="courier new,courier"&gt;*1.0&lt;/FONT&gt; option, it's only required on one of the variables to convert the result to floating point.&amp;nbsp; Problem solved!&lt;/P&gt;&lt;P&gt;As I get a bit more experience with DQL, I may come back to the original problem of calculating average lines/hr, but this will do for now.&lt;/P&gt;&lt;P&gt;Aaron&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jan 2025 19:27:02 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Log-Analytics/How-to-identify-the-list-of-servers-exhibiting-a-specific-high/m-p/266653#M1164</guid>
      <dc:creator>Aaron_L</dc:creator>
      <dc:date>2025-01-03T19:27:02Z</dc:date>
    </item>
  </channel>
</rss>

