diff options
author | Ola Aunronning <olaa@yahooinc.com> | 2023-11-13 13:45:08 +0100 |
---|---|---|
committer | Ola Aunronning <olaa@yahooinc.com> | 2023-11-13 13:45:08 +0100 |
commit | 7d413afce5949da4dfd25baf8d170acdb7d919d1 (patch) | |
tree | 9f8e382782293d52c2aca9d66fcf08758fd56100 /metrics-proxy/src/test/java/ai | |
parent | 87d3284e7a77304d4781dfb6808ddb1d5d9f98c3 (diff) |
Add host_life metric to prometheus output
Diffstat (limited to 'metrics-proxy/src/test/java/ai')
-rw-r--r-- | metrics-proxy/src/test/java/ai/vespa/metricsproxy/http/prometheus/PrometheusHandlerTest.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/metrics-proxy/src/test/java/ai/vespa/metricsproxy/http/prometheus/PrometheusHandlerTest.java b/metrics-proxy/src/test/java/ai/vespa/metricsproxy/http/prometheus/PrometheusHandlerTest.java index d6bde07d39a..e49a3c2bf50 100644 --- a/metrics-proxy/src/test/java/ai/vespa/metricsproxy/http/prometheus/PrometheusHandlerTest.java +++ b/metrics-proxy/src/test/java/ai/vespa/metricsproxy/http/prometheus/PrometheusHandlerTest.java @@ -2,6 +2,7 @@ package ai.vespa.metricsproxy.http.prometheus; import ai.vespa.metricsproxy.http.HttpHandlerTestBase; +import ai.vespa.metricsproxy.node.NodeMetricGatherer; import ai.vespa.metricsproxy.service.DummyService; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.ObjectMapper; @@ -35,7 +36,8 @@ public class PrometheusHandlerTest extends HttpHandlerTestBase { PrometheusHandler handler = new PrometheusHandler(Executors.newSingleThreadExecutor(), getMetricsManager(), vespaServices, - getMetricsConsumers()); + getMetricsConsumers(), + getNodeMetricGatherer()); testDriver = new RequestHandlerTestDriver(handler); valuesResponse = testDriver.sendRequest(VALUES_URI).readAll(); } @@ -92,4 +94,8 @@ public class PrometheusHandlerTest extends HttpHandlerTestBase { } throw new IllegalArgumentException("No line containing string: " + searchString); } + + private static NodeMetricGatherer getNodeMetricGatherer() { + return new NodeMetricGatherer(getMetricsManager(), getApplicationDimensions(), getNodeDimensions()); + } } |