Fix disk collector filesystem discovery with debug logging
All checks were successful
Build and Release / build-and-release (push) Successful in 1m9s

Add debug logging to filesystem usage collection to identify why
some mount points are being dropped during discovery. This should
resolve the issue where total capacity shows incorrect values.
This commit is contained in:
2025-11-23 15:15:56 +01:00
parent 9b940ebd19
commit 7d96ca9fad
5 changed files with 13 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
[package]
name = "cm-dashboard-agent"
version = "0.1.112"
version = "0.1.113"
edition = "2021"
[dependencies]

View File

@@ -148,8 +148,13 @@ impl DiskCollector {
let mut filesystem_usage = HashMap::new();
for mount_point in mount_devices.keys() {
if let Ok((total, used)) = self.get_filesystem_info(mount_point) {
filesystem_usage.insert(mount_point.clone(), (total, used));
match self.get_filesystem_info(mount_point) {
Ok((total, used)) => {
filesystem_usage.insert(mount_point.clone(), (total, used));
}
Err(e) => {
debug!("Failed to get filesystem info for {}: {}", mount_point, e);
}
}
}