From fb40cce748a30f07ca64cbbba6229d140f50af0f Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Thu, 27 Nov 2025 12:28:55 +0100 Subject: [PATCH] Add stderr logging for Docker images command failure Agent changes: - Log stderr output when docker images command fails - This will show the actual error message (e.g., permission denied, docker not found) - Helps diagnose why docker images collection is failing Updated to version 0.1.177 --- agent/Cargo.toml | 2 +- agent/src/collectors/systemd.rs | 3 ++- dashboard/Cargo.toml | 2 +- shared/Cargo.toml | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/agent/Cargo.toml b/agent/Cargo.toml index 940902d..855f92a 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-agent" -version = "0.1.176" +version = "0.1.177" edition = "2021" [dependencies] diff --git a/agent/src/collectors/systemd.rs b/agent/src/collectors/systemd.rs index 51fcd0e..73a2a3a 100644 --- a/agent/src/collectors/systemd.rs +++ b/agent/src/collectors/systemd.rs @@ -834,7 +834,8 @@ impl SystemdCollector { let output = match output { Ok(out) if out.status.success() => out, Ok(out) => { - info!("Docker images command failed with status: {}", out.status); + let stderr = String::from_utf8_lossy(&out.stderr); + info!("Docker images command failed with status: {}, stderr: {}", out.status, stderr); return images; } Err(e) => { diff --git a/dashboard/Cargo.toml b/dashboard/Cargo.toml index 0055c45..3ee54c4 100644 --- a/dashboard/Cargo.toml +++ b/dashboard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard" -version = "0.1.176" +version = "0.1.177" edition = "2021" [dependencies] diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 9152c9b..24409aa 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-shared" -version = "0.1.176" +version = "0.1.177" edition = "2021" [dependencies]