22#include "cluster/Backend.hpp"
23#include "cluster/ClioNode.hpp"
24#include "util/prometheus/Bool.hpp"
25#include "util/prometheus/Gauge.hpp"
26#include "util/prometheus/Prometheus.hpp"
42 "cluster_nodes_total_number",
44 "Total number of nodes this node can detect in the cluster."
49 "cluster_communication_is_healthy",
51 "Whether cluster communication service is operating healthy (1 - healthy, 0 - we have a problem)"
73 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:194
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:216
Metrics()
Constructs a Metrics instance and initializes metrics.
Definition Metrics.cpp:29
void onNewState(ClioNode::CUuid uuid, std::shared_ptr< Backend::ClusterData const > clusterData)
Updates metrics based on new cluster state.
Definition Metrics.cpp:36