summaryrefslogtreecommitdiff
path: root/src/metrics.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/metrics.c')
-rw-r--r--src/metrics.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/metrics.c b/src/metrics.c
index 7bac410..115b782 100644
--- a/src/metrics.c
+++ b/src/metrics.c
@@ -17,6 +17,7 @@ prom_histogram_t *offered = NULL;
prom_gauge_t *activeNodes = NULL;
prom_gauge_t *requestsInFlight = NULL;
prom_counter_t *retries = NULL;
+prom_counter_t *keepalive_count = NULL;
enum MHD_Result promhttp_handler(
void *cls,
@@ -192,6 +193,15 @@ void metric_init() {
NULL
)
);
+
+ keepalive_count = prom_collector_registry_must_register_metric(
+ prom_counter_new(
+ "dht_keepalive_count",
+ "Number of times a node has been pinged due to inactivity",
+ 0,
+ NULL
+ )
+ );
}
void metric_end() {