From b059f0ace73da02297611a9486e4cc9bef888d88 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Thu, 11 May 2023 07:50:09 +0200 Subject: [PATCH] Deprecate process supervisor collectors Mark the `supervisord` and `systemd` as deprecated. These are process supevisors like `runit` and out of scope for the node_exporter. Signed-off-by: Ben Kochie --- README.md | 4 ++-- collector/supervisord.go | 2 ++ collector/systemd_linux.go | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 035e49eea0..b519e3f2ed 100644 --- a/README.md +++ b/README.md @@ -196,9 +196,7 @@ perf | Exposes perf based metrics (Warning: Metrics are dependent on kernel conf processes | Exposes aggregate process statistics from `/proc`. | Linux qdisc | Exposes [queuing discipline](https://en.wikipedia.org/wiki/Network_scheduler#Linux_kernel) statistics | Linux slabinfo | Exposes slab statistics from `/proc/slabinfo`. Note that permission of `/proc/slabinfo` is usually 0400, so set it appropriately. | Linux -supervisord | Exposes service status from [supervisord](http://supervisord.org/). | _any_ sysctl | Expose sysctl values from `/proc/sys`. Use `--collector.sysctl.include(-info)` to configure. | Linux -systemd | Exposes service and system status from [systemd](http://www.freedesktop.org/wiki/Software/systemd/). | Linux tcpstat | Exposes TCP connection status information from `/proc/net/tcp` and `/proc/net/tcp6`. (Warning: the current version has potential performance issues in high load situations.) | Linux wifi | Exposes WiFi device and station statistics. | Linux zoneinfo | Exposes NUMA memory zone metrics. | Linux @@ -211,6 +209,8 @@ Name | Description | OS ---------|-------------|---- ntp | Exposes local NTP daemon health to check [time](./docs/TIME.md) | _any_ runit | Exposes service status from [runit](http://smarden.org/runit/). | _any_ +supervisord | Exposes service status from [supervisord](http://supervisord.org/). | _any_ +systemd | Exposes service and system status from [systemd](http://www.freedesktop.org/wiki/Software/systemd/). | Linux ### Perf Collector diff --git a/collector/supervisord.go b/collector/supervisord.go index c4e8a1c533..9b517f0a42 100644 --- a/collector/supervisord.go +++ b/collector/supervisord.go @@ -69,6 +69,8 @@ func NewSupervisordCollector(logger log.Logger) (Collector, error) { xrpc = xmlrpc.NewClient(*supervisordURL) } + level.Warn(logger).Log("msg", "This collector is deprecated and will be removed in the next major version release.") + return &supervisordCollector{ upDesc: prometheus.NewDesc( prometheus.BuildFQName(namespace, subsystem, "up"), diff --git a/collector/systemd_linux.go b/collector/systemd_linux.go index 31eb84d534..04d4e3eac6 100644 --- a/collector/systemd_linux.go +++ b/collector/systemd_linux.go @@ -154,6 +154,8 @@ func NewSystemdCollector(logger log.Logger) (Collector, error) { level.Info(logger).Log("msg", "Parsed flag --collector.systemd.unit-exclude", "flag", *unitExclude) unitExcludePattern := regexp.MustCompile(fmt.Sprintf("^(?:%s)$", *unitExclude)) + level.Warn(logger).Log("msg", "This collector is deprecated and will be removed in the next major version release.") + return &systemdCollector{ unitDesc: unitDesc, unitStartTimeDesc: unitStartTimeDesc,