From 4abf2c972e058ec875c0768f20d0d4766feb3173 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Thu, 23 Nov 2023 06:23:18 -0600 Subject: [PATCH 1/2] Update containerization warnings (#2855) Running node_exporter in containers is now a fairly well understood problem. Replace the warnings with something less dire and more prescriptive. Signed-off-by: Ben Kochie --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f2cabc56..b656be47 100644 --- a/README.md +++ b/README.md @@ -26,10 +26,10 @@ For automated installs with [Ansible](https://www.ansible.com/), there is the [P ### Docker -The `node_exporter` is designed to monitor the host system. It's not recommended -to deploy it as a Docker container because it requires access to the host system. +The `node_exporter` is designed to monitor the host system. Deploying in containers requires +extra care in order to avoid monitoring the container itself. -For situations where Docker deployment is needed, some extra flags must be used to allow +For situations where containerized deployment is needed, some extra flags must be used to allow the `node_exporter` access to the host namespaces. Be aware that any non-root mount points you want to monitor will need to be bind-mounted From 12f1744e799e04373c7a29b42bf8b8a332c82790 Mon Sep 17 00:00:00 2001 From: Simon Pasquier Date: Fri, 24 Nov 2023 16:37:27 +0100 Subject: [PATCH 2/2] Fix debug log in cpu collector (#2857) Signed-off-by: Simon Pasquier --- collector/cpu_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collector/cpu_linux.go b/collector/cpu_linux.go index d158567f..fcbf651b 100644 --- a/collector/cpu_linux.go +++ b/collector/cpu_linux.go @@ -205,7 +205,7 @@ func (c *cpuCollector) updateInfo(ch chan<- prometheus.Metric) error { cpuFreqEnabled, ok := collectorState["cpufreq"] if !ok || cpuFreqEnabled == nil { - level.Debug(c.logger).Log("cpufreq key missing or nil value in collectorState map", err) + level.Debug(c.logger).Log("msg", "cpufreq key missing or nil value in collectorState map") } else if !*cpuFreqEnabled { for _, cpu := range info { ch <- prometheus.MustNewConstMetric(c.cpuFrequencyHz,