<?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: Custom DB Query extension not providing the correct count in Extensions</title>
    <link>https://community.dynatrace.com/t5/Extensions/Custom-DB-Query-extension-not-providing-the-correct-count/m-p/302225#M7344</link>
    <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/100398"&gt;@tdavison76&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You have a timeout of 30 seconds. It cannot be greater than the period, but if you have 5 minutes, try 300 seconds for the timeout.&lt;/P&gt;</description>
    <pubDate>Wed, 22 Jul 2026 08:14:55 GMT</pubDate>
    <dc:creator>AntonioSousa</dc:creator>
    <dc:date>2026-07-22T08:14:55Z</dc:date>
    <item>
      <title>Custom DB Query extension not providing the correct count</title>
      <link>https://community.dynatrace.com/t5/Extensions/Custom-DB-Query-extension-not-providing-the-correct-count/m-p/302170#M7341</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I've created a Custom Extension that runs a SQL Query that just provides a "count".&amp;nbsp; This runs every 1 min, but, the returned count is not accurate.&amp;nbsp; It should be around 60+ per minute, but Dynatrace is showing single digit counts.&amp;nbsp; Also, it looks like it skips a minute occassionally.&amp;nbsp; I can run the query manually in SSMS and see the counts that I expect.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tdavison76_0-1784638524417.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33723i85E259F15FA4B7BD/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tdavison76_0-1784638524417.png" alt="tdavison76_0-1784638524417.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Here's the query:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;select count(*) as [count]
from [Mercury].[dbo].[OrderShipmentActual] (nolock)
where [CreateDate] &amp;gt; dateadd(mi, -1, getdate());&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here's how the extension is configured:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tdavison76_1-1784638688093.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33724i5891B6A9817DBD56/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tdavison76_1-1784638688093.png" alt="tdavison76_1-1784638688093.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Any idea how to resolve this and get the correct counts?&lt;/P&gt;&lt;P&gt;Thank you for any help on this one.&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2026 12:59:30 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Custom-DB-Query-extension-not-providing-the-correct-count/m-p/302170#M7341</guid>
      <dc:creator>tdavison76</dc:creator>
      <dc:date>2026-07-21T12:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: Custom DB Query extension not providing the correct count</title>
      <link>https://community.dynatrace.com/t5/Extensions/Custom-DB-Query-extension-not-providing-the-correct-count/m-p/302171#M7342</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/100398"&gt;@tdavison76&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Looks like the missing points might be from timeouts. Normally the timeout is 10 seconds, so put something higher, and let's check afterwards.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2026 13:26:03 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Custom-DB-Query-extension-not-providing-the-correct-count/m-p/302171#M7342</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2026-07-21T13:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: Custom DB Query extension not providing the correct count</title>
      <link>https://community.dynatrace.com/t5/Extensions/Custom-DB-Query-extension-not-providing-the-correct-count/m-p/302177#M7343</link>
      <description>&lt;P&gt;Hello Antonio, thank you for the help, I've modified the Query and Interval to be 5 min instead of 1.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tdavison76_0-1784643770707.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33725i7A1EAF26FA68B3E7/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tdavison76_0-1784643770707.png" alt="tdavison76_0-1784643770707.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Still seeing incorrect counts and looks like even more gaps.&amp;nbsp; e.g.&amp;nbsp; The below chart is showing a 25 count at 10:05, and the next count is only 2 and doesn't occur until 10:20am.&amp;nbsp; The SQL Query and 5 min intervals should be showing a count of 300+ every 5 min.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="tdavison76_1-1784643985203.png" style="width: 400px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/33727i5A0CFA3D6C1513C1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="tdavison76_1-1784643985203.png" alt="tdavison76_1-1784643985203.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks again for the help&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jul 2026 14:26:42 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Custom-DB-Query-extension-not-providing-the-correct-count/m-p/302177#M7343</guid>
      <dc:creator>tdavison76</dc:creator>
      <dc:date>2026-07-21T14:26:42Z</dc:date>
    </item>
    <item>
      <title>Re: Custom DB Query extension not providing the correct count</title>
      <link>https://community.dynatrace.com/t5/Extensions/Custom-DB-Query-extension-not-providing-the-correct-count/m-p/302225#M7344</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/100398"&gt;@tdavison76&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;You have a timeout of 30 seconds. It cannot be greater than the period, but if you have 5 minutes, try 300 seconds for the timeout.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Jul 2026 08:14:55 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Extensions/Custom-DB-Query-extension-not-providing-the-correct-count/m-p/302225#M7344</guid>
      <dc:creator>AntonioSousa</dc:creator>
      <dc:date>2026-07-22T08:14:55Z</dc:date>
    </item>
  </channel>
</rss>

