From 376373563555073cfb0d298b46a1f2534ef44d68 Mon Sep 17 00:00:00 2001 From: Matthias Rampke Date: Tue, 14 Feb 2023 18:41:44 +0100 Subject: [PATCH] Use same name for idle percent metric as upstream The official HAProxy exporter plugin uses `haproxy_process_idle_time_percent`, let's be consistent with that. Follow-up for #236. Signed-off-by: Matthias Rampke --- haproxy_exporter.go | 2 +- test/unix_domain.metrics | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/haproxy_exporter.go b/haproxy_exporter.go index b5b0482..7ae755a 100644 --- a/haproxy_exporter.go +++ b/haproxy_exporter.go @@ -234,7 +234,7 @@ var ( haproxyInfo = prometheus.NewDesc(prometheus.BuildFQName(namespace, "version", "info"), "HAProxy version info.", []string{"release_date", "version"}, nil) haproxyUp = prometheus.NewDesc(prometheus.BuildFQName(namespace, "", "up"), "Was the last scrape of HAProxy successful.", nil, nil) - haproxyIdlePct = prometheus.NewDesc(prometheus.BuildFQName(namespace, "idle", "percent"), "Time spent waiting for events instead of processing them.", nil, nil) + haproxyIdlePct = prometheus.NewDesc(prometheus.BuildFQName(namespace, "process_idle_time", "percent"), "Time spent waiting for events instead of processing them.", nil, nil) ) // Exporter collects HAProxy stats from the given URI and exports them using diff --git a/test/unix_domain.metrics b/test/unix_domain.metrics index fbc6b3b..bd85526 100644 --- a/test/unix_domain.metrics +++ b/test/unix_domain.metrics @@ -81,6 +81,6 @@ haproxy_up 1 # HELP haproxy_version_info HAProxy version info. # TYPE haproxy_version_info gauge haproxy_version_info{release_date="test date",version="test version"} 1 -# HELP haproxy_idle_percent Time spent waiting for events instead of processing them. -# TYPE haproxy_idle_percent gauge -haproxy_idle_percent 100 +# HELP haproxy_process_idle_time_percent Time spent waiting for events instead of processing them. +# TYPE haproxy_process_idle_time_percent gauge +haproxy_process_idle_time_percent 100