From 3959d63fd34ac5d1db95dd0c1aaa722f96b9f09e Mon Sep 17 00:00:00 2001 From: "Ciro S. Costa" Date: Tue, 24 Aug 2021 11:07:46 -0400 Subject: [PATCH] collector: include total txcount Signed-off-by: Ciro S. Costa --- pkg/collector/collector_info.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/collector/collector_info.go b/pkg/collector/collector_info.go index 80837b4..5081b22 100644 --- a/pkg/collector/collector_info.go +++ b/pkg/collector/collector_info.go @@ -179,6 +179,17 @@ func (c *OverallCollector) collect() { prometheus.GaugeValue, float64(c.info.FreeSpace), ) + + c.metricsC <- prometheus.MustNewConstMetric( + prometheus.NewDesc( + "monero_info_transactions_total", + "total number of transactions seen so far", + nil, nil, + ), + prometheus.GaugeValue, + float64(c.info.TxCount), + ) + } func boolToFloat64(b bool) float64 {