You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: adapter-base/src/main/java/org/eclipse/hono/adapter/resourcelimits/PrometheusBasedResourceLimitCheckOptions.java
+8
Original file line number
Diff line number
Diff line change
@@ -64,6 +64,14 @@ public interface PrometheusBasedResourceLimitCheckOptions {
64
64
@WithDefault("60")
65
65
longcacheTimeout();
66
66
67
+
/**
68
+
* Gets the divisor value for calculating cached data refresh time duration from cache timeout duration.
69
+
*
70
+
* @return The divisor value for calculating refresh time duration.
71
+
*/
72
+
@WithDefault("2")
73
+
intcacheRefreshDivisor();
74
+
67
75
/**
68
76
* Gets the period of time after which a request to a Prometheus server are closed.
Copy file name to clipboardexpand all lines: adapter-base/src/main/java/org/eclipse/hono/adapter/resourcelimits/PrometheusBasedResourceLimitChecksConfig.java
+32
Original file line number
Diff line number
Diff line change
@@ -32,6 +32,10 @@ public class PrometheusBasedResourceLimitChecksConfig extends AuthenticatingClie
32
32
* The default timeout for cached data in seconds until they are considered invalid.
33
33
*/
34
34
publicstaticfinallongDEFAULT_CACHE_TIMEOUT = 60L;
35
+
/**
36
+
* The default divisor value for cached data refresh time duration calculation.
Copy file name to clipboardexpand all lines: site/documentation/content/admin-guide/common-config.md
+1
Original file line number
Diff line number
Diff line change
@@ -165,6 +165,7 @@ configuring the checker.
165
165
|`HONO_RESOURCELIMITS_PROMETHEUSBASED_CACHEMINSIZE`<br>`hono.resourceLimits.prometheusBased.cacheMinSize`| no |`20`| The minimum size of the cache to store the metrics data retrieved from the Prometheus server. The cache is used for storing the current amount of data exchanged with devices of tenants. |
166
166
|`HONO_RESOURCELIMITS_PROMETHEUSBASED_CACHEMAXSIZE`<br>`hono.resourceLimits.prometheusBased.cacheMaxSize`| no |`1000`| The maximum size of the cache to store the metrics data retrieved from the Prometheus server. |
167
167
|`HONO_RESOURCELIMITS_PROMETHEUSBASED_CACHETIMEOUT`<br>`hono.resourceLimits.prometheusBased.cacheTimeout`| no |`60`| The number of seconds after which the cached metrics data should be considered invalid. |
168
+
|`HONO_RESOURCELIMITS_PROMETHEUSBASED_CACHEREFRESHDIVISOR`<br>`hono.resourceLimits.prometheusBased.cacheRefreshDivisor`| no |`2`| The divisor used to calculate the refresh time duration after which cached metrics data refreshing in the background is allowed. The duration is calculated as the cache timeout duration divided by this value. |
168
169
|`HONO_RESOURCELIMITS_PROMETHEUSBASED_CONNECTTIMEOUT`<br>`hono.resourceLimits.prometheusBased.connectTimeout`| no |`1000`| The maximum number of milliseconds that the adapter waits for a TCP connection to a Prometheus server to be established.|
169
170
|`HONO_RESOURCELIMITS_PROMETHEUSBASED_QUERYTIMEOUT`<br>`hono.resourceLimits.prometheusBased.queryTimeout`| no |`500`| The number of milliseconds after which a request to a Prometheus server is closed. Setting zero or a negative value disables the timeout.|
0 commit comments