From 3108a50fb63500813cc13767f4e7fb2ae18b8b4a Mon Sep 17 00:00:00 2001 From: mknapphrt <39998367+mknapphrt@users.noreply.github.com> Date: Tue, 25 Jun 2019 03:37:48 -0400 Subject: [PATCH] Fix systemd restart counter label from state to name (#1393) Signed-off-by: Mark Knapp --- CHANGELOG.md | 2 ++ collector/systemd_linux.go | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 60c39b25..3264fd36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### **Breaking changes** * The netdev collector CLI argument `--collector.netdev.ignored-devices` was renamed to `--collector.netdev.device-blacklist` in order to conform with the systemd collector. #1279 +* The label named `state` on `node_systemd_service_restart_total` metrics was changed to `name` to better describe the metric. #1393 ### Changes @@ -10,6 +11,7 @@ * [CHANGE] Add `--collector.netdev.device-whitelist`. #1279 * [FEATURE] * [ENHANCEMENT] +* [BUGFIX] Renamed label `state` to `name` on `node_systemd_service_restart_total`. #1393 ## 0.18.1 / 2019-06-04 diff --git a/collector/systemd_linux.go b/collector/systemd_linux.go index ae55499d..4b9db103 100644 --- a/collector/systemd_linux.go +++ b/collector/systemd_linux.go @@ -90,7 +90,7 @@ func NewSystemdCollector() (Collector, error) { "Summary of systemd unit states", []string{"state"}, nil) nRestartsDesc := prometheus.NewDesc( prometheus.BuildFQName(namespace, subsystem, "service_restart_total"), - "Service unit count of Restart triggers", []string{"state"}, nil) + "Service unit count of Restart triggers", []string{"name"}, nil) timerLastTriggerDesc := prometheus.NewDesc( prometheus.BuildFQName(namespace, subsystem, "timer_last_trigger_seconds"), "Seconds since epoch of last trigger.", []string{"name"}, nil)