Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
Use same name for idle percent metric as upstream
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
matthiasr committed Feb 14, 2023
1 parent 4b99f0f commit 3763735
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion haproxy_exporter.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions test/unix_domain.metrics
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3763735

Please sign in to comment.