diff options
author | Arne Juul <arnej@yahooinc.com> | 2023-02-19 21:39:51 +0000 |
---|---|---|
committer | Arne Juul <arnej@yahooinc.com> | 2023-02-19 21:39:51 +0000 |
commit | 6fbe62ee9de7b58310375c3bb75b25852650fe82 (patch) | |
tree | a293cfe0ae96fc8bc7ce43a6e43204afb343931d | |
parent | d3bfe633c12b6efd34b23b4c2572fc23c3ad3283 (diff) |
add metric for current config generation
5 files changed, 7 insertions, 0 deletions
diff --git a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java index 925f390aad2..765bce7b68e 100644 --- a/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java +++ b/config-model/src/main/java/com/yahoo/vespa/model/admin/monitoring/VespaMetricSet.java @@ -334,6 +334,8 @@ public class VespaMetricSet { private static Set<Metric> getSearchNodeMetrics() { Set<Metric> metrics = new LinkedHashSet<>(); + addMetric(metrics, SearchNodeMetrics.CONTENT_PROTON_CONFIG_GENERATION.last()); + addMetric(metrics, SearchNodeMetrics.CONTENT_PROTON_DOCUMENTDB_DOCUMENTS_TOTAL.last()); addMetric(metrics, SearchNodeMetrics.CONTENT_PROTON_DOCUMENTDB_DOCUMENTS_READY.last()); addMetric(metrics, SearchNodeMetrics.CONTENT_PROTON_DOCUMENTDB_DOCUMENTS_ACTIVE.last()); diff --git a/container-core/src/main/java/com/yahoo/metrics/SearchNodeMetrics.java b/container-core/src/main/java/com/yahoo/metrics/SearchNodeMetrics.java index 42d0bee2dc6..285c3a652bf 100644 --- a/container-core/src/main/java/com/yahoo/metrics/SearchNodeMetrics.java +++ b/container-core/src/main/java/com/yahoo/metrics/SearchNodeMetrics.java @@ -7,6 +7,8 @@ import java.util.List; */ public enum SearchNodeMetrics implements VespaMetrics { + CONTENT_PROTON_CONFIG_GENERATION("content.proton.config_generation", Unit.VERSION, "The oldest config generation used by this search node"), + CONTENT_PROTON_DOCUMENTDB_DOCUMENTS_TOTAL("content.proton.documentdb.documents.total", Unit.DOCUMENT, "The total number of documents in this documents db (ready + not-ready)"), CONTENT_PROTON_DOCUMENTDB_DOCUMENTS_READY("content.proton.documentdb.documents.ready", Unit.DOCUMENT, "The number of ready documents in this document db"), CONTENT_PROTON_DOCUMENTDB_DOCUMENTS_ACTIVE("content.proton.documentdb.documents.active", Unit.DOCUMENT, "The number of active / searchable documents in this document db"), diff --git a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp index c2d09fa341b..7e9a5b0ee4a 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp +++ b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.cpp @@ -29,6 +29,7 @@ ContentProtonMetrics::ProtonExecutorMetrics::~ProtonExecutorMetrics() = default; ContentProtonMetrics::ContentProtonMetrics() : metrics::MetricSet("content.proton", {}, "Search engine metrics", nullptr), + configGeneration("config_generation", {}, "The oldest config generation used by this process", this), transactionLog(this), resourceUsage(this), executor(this), diff --git a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h index 127e32ada07..c82a6804380 100644 --- a/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h +++ b/searchcore/src/vespa/searchcore/proton/metrics/content_proton_metrics.h @@ -41,6 +41,7 @@ struct ContentProtonMetrics : metrics::MetricSet ~SessionCacheMetrics() override; }; + metrics::LongValueMetric configGeneration; TransLogServerMetrics transactionLog; ResourceUsageMetrics resourceUsage; ProtonExecutorMetrics executor; diff --git a/searchcore/src/vespa/searchcore/proton/server/proton.cpp b/searchcore/src/vespa/searchcore/proton/server/proton.cpp index 54009ef60f4..34961414d57 100644 --- a/searchcore/src/vespa/searchcore/proton/server/proton.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/proton.cpp @@ -796,6 +796,7 @@ Proton::updateMetrics(const metrics::MetricLockGuard &) { { ContentProtonMetrics &metrics = _metricsEngine->root(); + metrics.configGeneration.set(getConfigGeneration()); auto tls = _tls->getTransLogServer(); if (tls) { metrics.transactionLog.update(tls->getDomainStats()); |