<?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>article A warning message &amp;quot;Counter metric cache limit exceeded&amp;quot; in AG logs. in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/A-warning-message-quot-Counter-metric-cache-limit-exceeded-quot/ta-p/264981</link>
    <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;ActiveGate has a counter metric cache that transforms monotonic counters to delta counters, for cluster scalability reasons. This cache, by default, currently allows 100.000 entries and AG rejects some counter metrics when the limit has been reached.&lt;/P&gt;
&lt;H1 id="toc-hId--705515381"&gt;&lt;STRONG&gt;Symptoms&lt;/STRONG&gt;&lt;/H1&gt;
&lt;P&gt;You enabled monitoring of &lt;A href="https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/container-platform-monitoring/kubernetes-monitoring/monitor-prometheus-metrics" target="_self"&gt;Prometheus metrics&lt;/A&gt; and missing some metrics which type is counter. In the AG logs, you observe the following warning message:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;timestamp&amp;gt; UTC WARNING [&amp;lt;environment-id&amp;gt;] [CounterCacheImpl] Counter metric cache limit exceeded: 100000. Data point evicted. Reason: SIZE [Suppressing further identical messages for 1 hour]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId--1514862007"&gt;&lt;STRONG&gt;Resolution&lt;/STRONG&gt;&lt;/H1&gt;
&lt;P&gt;There are two possible options to overcome the problem.&lt;/P&gt;
&lt;P&gt;1. &lt;A href="https://docs.dynatrace.com/docs/shortlink/monitor-prometheus-metrics#filter-metrics" target="_self"&gt;Filter ingested metrics&lt;/A&gt; and exclude unnecessary ones&lt;/P&gt;
&lt;P&gt;2. Extend the cache limit parameters in the &lt;A href="https://docs.dynatrace.com/docs/shortlink/sgw-configure#custom-properties" target="_self"&gt;custom.properties file&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;[kubernetes_monitoring]&lt;BR /&gt;mint_metric_counter_metric_cache_size=300000&lt;BR /&gt;mint_metric_counter_metric_cache_expiry_duration_minutes=2&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;For containerized AGs, deployed via the Dynatrace operator, enable the same configuration in the &lt;A href="https://github.com/Dynatrace/dynatrace-operator/blob/main/assets/samples/dynakube/v1beta2/cloudNativeFullStack.yaml" target="_self"&gt;dynakube&lt;/A&gt;.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;activeGate:&lt;BR /&gt;  ...&lt;BR /&gt;  customProperties:&lt;BR /&gt;    value: |&lt;BR /&gt;     [kubernetes_monitoring]&lt;BR /&gt;     mint_metric_counter_metric_cache_size=300000&lt;BR /&gt;     mint_metric_counter_metric_cache_expiry_duration_minutes=2&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 11 Dec 2024 11:38:01 GMT</pubDate>
    <dc:creator>shahinm</dc:creator>
    <dc:date>2024-12-11T11:38:01Z</dc:date>
    <item>
      <title>A warning message "Counter metric cache limit exceeded" in AG logs.</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/A-warning-message-quot-Counter-metric-cache-limit-exceeded-quot/ta-p/264981</link>
      <description>&lt;DIV class="lia-message-template-content-zone"&gt;
&lt;P&gt;ActiveGate has a counter metric cache that transforms monotonic counters to delta counters, for cluster scalability reasons. This cache, by default, currently allows 100.000 entries and AG rejects some counter metrics when the limit has been reached.&lt;/P&gt;
&lt;H1 id="toc-hId--705515381"&gt;&lt;STRONG&gt;Symptoms&lt;/STRONG&gt;&lt;/H1&gt;
&lt;P&gt;You enabled monitoring of &lt;A href="https://docs.dynatrace.com/docs/observe/infrastructure-monitoring/container-platform-monitoring/kubernetes-monitoring/monitor-prometheus-metrics" target="_self"&gt;Prometheus metrics&lt;/A&gt; and missing some metrics which type is counter. In the AG logs, you observe the following warning message:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;&amp;lt;timestamp&amp;gt; UTC WARNING [&amp;lt;environment-id&amp;gt;] [CounterCacheImpl] Counter metric cache limit exceeded: 100000. Data point evicted. Reason: SIZE [Suppressing further identical messages for 1 hour]&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1 id="toc-hId--1514862007"&gt;&lt;STRONG&gt;Resolution&lt;/STRONG&gt;&lt;/H1&gt;
&lt;P&gt;There are two possible options to overcome the problem.&lt;/P&gt;
&lt;P&gt;1. &lt;A href="https://docs.dynatrace.com/docs/shortlink/monitor-prometheus-metrics#filter-metrics" target="_self"&gt;Filter ingested metrics&lt;/A&gt; and exclude unnecessary ones&lt;/P&gt;
&lt;P&gt;2. Extend the cache limit parameters in the &lt;A href="https://docs.dynatrace.com/docs/shortlink/sgw-configure#custom-properties" target="_self"&gt;custom.properties file&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Example:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;[kubernetes_monitoring]&lt;BR /&gt;mint_metric_counter_metric_cache_size=300000&lt;BR /&gt;mint_metric_counter_metric_cache_expiry_duration_minutes=2&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;For containerized AGs, deployed via the Dynatrace operator, enable the same configuration in the &lt;A href="https://github.com/Dynatrace/dynatrace-operator/blob/main/assets/samples/dynakube/v1beta2/cloudNativeFullStack.yaml" target="_self"&gt;dynakube&lt;/A&gt;.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;activeGate:&lt;BR /&gt;  ...&lt;BR /&gt;  customProperties:&lt;BR /&gt;    value: |&lt;BR /&gt;     [kubernetes_monitoring]&lt;BR /&gt;     mint_metric_counter_metric_cache_size=300000&lt;BR /&gt;     mint_metric_counter_metric_cache_expiry_duration_minutes=2&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 11 Dec 2024 11:38:01 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/A-warning-message-quot-Counter-metric-cache-limit-exceeded-quot/ta-p/264981</guid>
      <dc:creator>shahinm</dc:creator>
      <dc:date>2024-12-11T11:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: A warning message "Counter metric cache limit exceeded" in AG logs.</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/A-warning-message-quot-Counter-metric-cache-limit-exceeded-quot/tac-p/267381#M818</link>
      <description>&lt;P&gt;Something frustrating about this is that I find this documented in this post and at the time of me writing this post, there doesn't seem to be any kind of documentation around these custom property fields.&lt;/P&gt;&lt;P&gt;I was also looking to see if Dynatrace does something with other type of metrics it is scraping, but no luck.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2025 12:45:31 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/A-warning-message-quot-Counter-metric-cache-limit-exceeded-quot/tac-p/267381#M818</guid>
      <dc:creator>paum</dc:creator>
      <dc:date>2025-01-14T12:45:31Z</dc:date>
    </item>
    <item>
      <title>Re: A warning message "Counter metric cache limit exceeded" in AG logs.</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/A-warning-message-quot-Counter-metric-cache-limit-exceeded-quot/tac-p/275320#M896</link>
      <description>&lt;P&gt;Agree. No documentation for&amp;nbsp;&lt;SPAN&gt;mint_metric_counter_metric_cache_size. What is this property mean? Is it cache, if yes, how to reset or how is his value calculated.?The active gate restart does not reset this property, the only option is to increase the value. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp; No luck so far to find the additional details.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 16 Apr 2025 15:10:06 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/A-warning-message-quot-Counter-metric-cache-limit-exceeded-quot/tac-p/275320#M896</guid>
      <dc:creator>the_real_anil</dc:creator>
      <dc:date>2025-04-16T15:10:06Z</dc:date>
    </item>
  </channel>
</rss>

