Fix disk collector filesystem discovery with debug logging
All checks were successful
Build and Release / build-and-release (push) Successful in 1m9s
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:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user