3#include "cluster/Backend.hpp"
4#include "cluster/ClioNode.hpp"
5#include "util/prometheus/Bool.hpp"
6#include "util/prometheus/Gauge.hpp"
7#include "util/prometheus/Prometheus.hpp"
23 "cluster_nodes_total_number",
25 "Total number of nodes this node can detect in the cluster."
30 "cluster_communication_is_healthy",
32 "Whether cluster communication service is operating healthy (1 - healthy, 0 - we have a "
56 onNewState(ClioNode::CUuid uuid, std::shared_ptr<Backend::ClusterData const> clusterData);
static util::prometheus::Bool boolMetric(std::string name, util::prometheus::Labels labels, std::optional< std::string > description=std::nullopt)
Get a bool based metric. It will be created if it doesn't exist.
Definition Prometheus.cpp:201
static util::prometheus::GaugeInt & gaugeInt(std::string name, util::prometheus::Labels labels, std::optional< std::string > description=std::nullopt)
Get an integer based gauge metric. It will be created if it doesn't exist.
Definition Prometheus.cpp:231
Metrics()
Constructs a Metrics instance and initializes metrics.
Definition Metrics.cpp:10
void onNewState(ClioNode::CUuid uuid, std::shared_ptr< Backend::ClusterData const > clusterData)
Updates metrics based on new cluster state.
Definition Metrics.cpp:17