Count events for which no mapping was found

This commit is contained in:
Johannes 'fish' Ziemke 2016-05-02 21:19:46 +02:00
parent f031e30721
commit 3d0ccb9ed5
2 changed files with 6 additions and 1 deletions

View file

@ -218,6 +218,7 @@ func (b *Exporter) Listen(e <-chan Events) {
}
}
} else {
eventsUnmapped.Inc()
metricName = escapeMetricName(event.MetricName())
}

View file

@ -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.",
})
)