Remove debug logging from disk collector
All checks were successful
Build and Release / build-and-release (push) Successful in 1m11s
All checks were successful
Build and Release / build-and-release (push) Successful in 1m11s
Removed all debug! statements from disk collector to reduce log noise. Bump version to v0.1.226
This commit is contained in:
@@ -5,9 +5,7 @@ use cm_dashboard_shared::{AgentData, DriveData, FilesystemData, PoolData, Hyster
|
||||
use crate::config::DiskConfig;
|
||||
use tokio::process::Command as TokioCommand;
|
||||
use std::process::Command as StdCommand;
|
||||
use std::time::Instant;
|
||||
use std::collections::HashMap;
|
||||
use tracing::debug;
|
||||
|
||||
use super::{Collector, CollectorError};
|
||||
|
||||
@@ -68,9 +66,6 @@ impl DiskCollector {
|
||||
|
||||
/// Collect all storage data and populate AgentData
|
||||
async fn collect_storage_data(&self, agent_data: &mut AgentData) -> Result<(), CollectorError> {
|
||||
let start_time = Instant::now();
|
||||
debug!("Starting clean storage collection");
|
||||
|
||||
// Step 1: Get mount points and their backing devices
|
||||
let mount_devices = self.get_mount_devices().await?;
|
||||
|
||||
@@ -105,9 +100,6 @@ impl DiskCollector {
|
||||
self.populate_drives_data(&physical_drives, &smart_data, agent_data)?;
|
||||
self.populate_pools_data(&mergerfs_pools, &smart_data, agent_data)?;
|
||||
|
||||
let elapsed = start_time.elapsed();
|
||||
debug!("Storage collection completed in {:?}", elapsed);
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
@@ -142,7 +134,6 @@ impl DiskCollector {
|
||||
}
|
||||
}
|
||||
|
||||
debug!("Found {} mounted block devices", mount_devices.len());
|
||||
Ok(mount_devices)
|
||||
}
|
||||
|
||||
@@ -155,8 +146,8 @@ impl DiskCollector {
|
||||
Ok((total, used)) => {
|
||||
filesystem_usage.insert(mount_point.clone(), (total, used));
|
||||
}
|
||||
Err(e) => {
|
||||
debug!("Failed to get filesystem info for {}: {}", mount_point, e);
|
||||
Err(_e) => {
|
||||
// Silently skip filesystems we can't read
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,8 +168,6 @@ impl DiskCollector {
|
||||
// Only add if we don't already have usage data for this mount point
|
||||
if !filesystem_usage.contains_key(&mount_point) {
|
||||
if let Ok((total, used)) = self.get_filesystem_info(&mount_point) {
|
||||
debug!("Added MergerFS filesystem usage for {}: {}GB total, {}GB used",
|
||||
mount_point, total as f32 / (1024.0 * 1024.0 * 1024.0), used as f32 / (1024.0 * 1024.0 * 1024.0));
|
||||
filesystem_usage.insert(mount_point, (total, used));
|
||||
}
|
||||
}
|
||||
@@ -253,9 +242,8 @@ impl DiskCollector {
|
||||
} else {
|
||||
mount_point.trim_start_matches('/').replace('/', "_")
|
||||
};
|
||||
|
||||
|
||||
if pool_name.is_empty() {
|
||||
debug!("Skipping mergerfs pool with empty name: {}", mount_point);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -283,8 +271,7 @@ impl DiskCollector {
|
||||
// Categorize as data vs parity drives
|
||||
let (data_drives, parity_drives) = match self.categorize_pool_drives(&all_member_paths) {
|
||||
Ok(drives) => drives,
|
||||
Err(e) => {
|
||||
debug!("Failed to categorize drives for pool {}: {}. Skipping.", mount_point, e);
|
||||
Err(_e) => {
|
||||
continue;
|
||||
}
|
||||
};
|
||||
@@ -299,8 +286,7 @@ impl DiskCollector {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
debug!("Found {} mergerfs pools", pools.len());
|
||||
|
||||
Ok(pools)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user