diff options
Diffstat (limited to 'configd/src/apps/sentinel/metrics.h')
-rw-r--r-- | configd/src/apps/sentinel/metrics.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/configd/src/apps/sentinel/metrics.h b/configd/src/apps/sentinel/metrics.h index dd24bb2280d..2378a055663 100644 --- a/configd/src/apps/sentinel/metrics.h +++ b/configd/src/apps/sentinel/metrics.h @@ -2,20 +2,29 @@ #pragma once #include <sys/time.h> +#include <vespa/vespalib/metrics/simple_metrics.h> namespace config::sentinel { +using vespalib::metrics::Counter; +using vespalib::metrics::Gauge; +using vespalib::metrics::MetricsManager; + struct StartMetrics { + std::shared_ptr<MetricsManager> metrics; + vespalib::metrics::Producer producer; unsigned long currentlyRunningServices; unsigned long totalRestartsCounter; unsigned long totalRestartsLastPeriod; - long lastLoggedTime; - unsigned long totalRestartsLastSnapshot; - long snapshotStart; - long snapshotEnd; long startedTime; + long lastLoggedTime; + Counter sentinel_restarts; + Gauge sentinel_totalRestarts; + Gauge sentinel_running; + Gauge sentinel_uptime; StartMetrics(); + ~StartMetrics() {} void output(); void reset(unsigned long curTime); @@ -23,4 +32,3 @@ struct StartMetrics { }; } - |