From c5b05341a3ac816a0814e2ace191aaf132d8d4b0 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Thu, 1 Jun 2017 14:26:00 +0200 Subject: [PATCH] Improve metric naming. Rename the queue_* metrics to showq_*, named after the other processes. Also add a missing _total suffix to the SASL failures metric. --- postfix_exporter.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/postfix_exporter.go b/postfix_exporter.go index 44906d3..cbe2687 100644 --- a/postfix_exporter.go +++ b/postfix_exporter.go @@ -96,7 +96,7 @@ func CollectTextualShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) sizeHistogram := prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "postfix", - Name: "queue_message_size_bytes", + Name: "showq_message_size_bytes", Help: "Size of messages in Postfix's message queue, in bytes", Buckets: []float64{1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9}, }, @@ -104,7 +104,7 @@ func CollectTextualShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) ageHistogram := prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "postfix", - Name: "queue_message_age_seconds", + Name: "showq_message_age_seconds", Help: "Age of messages in Postfix's message queue, in seconds", Buckets: []float64{1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8}, }, @@ -177,7 +177,7 @@ func CollectBinaryShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) e sizeHistogram := prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "postfix", - Name: "queue_message_size_bytes", + Name: "showq_message_size_bytes", Help: "Size of messages in Postfix's message queue, in bytes", Buckets: []float64{1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9}, }, @@ -185,7 +185,7 @@ func CollectBinaryShowqFromReader(file io.Reader, ch chan<- prometheus.Metric) e ageHistogram := prometheus.NewHistogramVec( prometheus.HistogramOpts{ Namespace: "postfix", - Name: "queue_message_age_seconds", + Name: "showq_message_age_seconds", Help: "Age of messages in Postfix's message queue, in seconds", Buckets: []float64{1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8}, }, @@ -486,7 +486,7 @@ func NewPostfixExporter(showqPath string, logfilePath string) (*PostfixExporter, []string{"code"}), smtpdSASLAuthenticationFailures: prometheus.NewCounter(prometheus.CounterOpts{ Namespace: "postfix", - Name: "smtpd_sasl_authentication_failures", + Name: "smtpd_sasl_authentication_failures_total", Help: "Total number of SASL authentication failures.", }), smtpdTLSConnects: prometheus.NewCounterVec(