From 3d0ccb9ed58f2d18f5dabf693d3376aa5823878e Mon Sep 17 00:00:00 2001 From: Johannes 'fish' Ziemke Date: Mon, 2 May 2016 21:19:46 +0200 Subject: [PATCH] Count events for which no mapping was found --- exporter.go | 1 + telemetry.go | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/exporter.go b/exporter.go index 0eea62b..616d2a6 100644 --- a/exporter.go +++ b/exporter.go @@ -218,6 +218,7 @@ func (b *Exporter) Listen(e <-chan Events) { } } } else { + eventsUnmapped.Inc() metricName = escapeMetricName(event.MetricName()) } diff --git a/telemetry.go b/telemetry.go index 1224f66..159dc93 100644 --- a/telemetry.go +++ b/telemetry.go @@ -25,6 +25,10 @@ var ( }, []string{"type"}, ) + eventsUnmapped = prometheus.NewCounter(prometheus.CounterOpts{ + Name: "statsd_exporter_events_unmapped_total", + Help: "The total number of StatsD events no mapping was found for.", + }) networkStats = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "statsd_exporter_packets_total", @@ -41,7 +45,7 @@ var ( ) mappingsCount = prometheus.NewGauge(prometheus.GaugeOpts{ Name: "statsd_exporter_loaded_mappings_count", - Help: "The number of configured metric mappings.", + Help: "The current number of configured metric mappings.", }) )