diff options
Diffstat (limited to 'src/metrics.c')
| -rw-r--r-- | src/metrics.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/metrics.c b/src/metrics.c index 3a56837..7bac410 100644 --- a/src/metrics.c +++ b/src/metrics.c @@ -8,6 +8,7 @@ prom_counter_t *bytesSent = NULL; prom_counter_t *meta = NULL; prom_counter_t *peers = NULL; +prom_gauge_t *current_hashes = NULL; prom_counter_t *hashes = NULL; prom_counter_t *hash_expired = NULL; prom_counter_t *queries = NULL; @@ -110,6 +111,15 @@ void metric_init() { ) ); + current_hashes = prom_collector_registry_must_register_metric( + prom_gauge_new( + "dht_live_hashes_total", + "Number of hashes with active peers", + 0, + NULL + ) + ); + hashes = prom_collector_registry_must_register_metric( prom_counter_new( "dht_hashes_total", |
