diff --git a/Cargo.lock b/Cargo.lock index 9d58757..0efcc65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d" [[package]] name = "cm-dashboard" -version = "0.1.223" +version = "0.1.224" dependencies = [ "anyhow", "chrono", @@ -301,7 +301,7 @@ dependencies = [ [[package]] name = "cm-dashboard-agent" -version = "0.1.223" +version = "0.1.224" dependencies = [ "anyhow", "async-trait", @@ -325,7 +325,7 @@ dependencies = [ [[package]] name = "cm-dashboard-shared" -version = "0.1.223" +version = "0.1.224" dependencies = [ "chrono", "serde", diff --git a/agent/Cargo.toml b/agent/Cargo.toml index 80f2ac0..515fce3 100644 --- a/agent/Cargo.toml +++ b/agent/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-agent" -version = "0.1.224" +version = "0.1.225" edition = "2021" [dependencies] diff --git a/agent/src/collectors/disk.rs b/agent/src/collectors/disk.rs index 57049e3..f377c0d 100644 --- a/agent/src/collectors/disk.rs +++ b/agent/src/collectors/disk.rs @@ -451,8 +451,10 @@ impl DiskCollector { let output_str = String::from_utf8_lossy(&output.stdout); - if !output.status.success() { - // Return unknown data rather than failing completely + // Note: smartctl returns non-zero exit codes for warnings (like exit code 32 + // for "temperature was high in the past"), but the output data is still valid. + // Only check if we got any output at all, don't reject based on exit code. + if output_str.is_empty() { return Ok(SmartData { health: "UNKNOWN".to_string(), serial_number: None, @@ -460,7 +462,7 @@ impl DiskCollector { wear_percent: None, }); } - + let mut health = "UNKNOWN".to_string(); let mut serial_number = None; let mut temperature = None; diff --git a/dashboard/Cargo.toml b/dashboard/Cargo.toml index 6812624..baf6080 100644 --- a/dashboard/Cargo.toml +++ b/dashboard/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard" -version = "0.1.224" +version = "0.1.225" edition = "2021" [dependencies] diff --git a/shared/Cargo.toml b/shared/Cargo.toml index 2d6c41b..fa92dd2 100644 --- a/shared/Cargo.toml +++ b/shared/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cm-dashboard-shared" -version = "0.1.224" +version = "0.1.225" edition = "2021" [dependencies]