Enhance disk collector with individual drive health monitoring

- Add StoragePool and DriveInfo structures for grouping drives by mount point
- Implement SMART data collection for individual drives (health, temperature, wear)
- Support for ext4, zfs, xfs, mergerfs, btrfs filesystem types
- Generate individual drive metrics: disk_[pool]_[drive]_health/temperature/wear
- Add storage_type and underlying_devices to filesystem configuration
- Move hardcoded service directory mappings to NixOS configuration
- Move hardcoded host-to-user mapping to NixOS configuration
- Remove all unused code and fix compilation warnings
- Clean implementation with zero warnings and no dead code

Individual drives now show health status per storage pool:
Storage root (ext4): nvme0n1 PASSED 42°C 5% wear
Storage steampool (mergerfs): sda/sdb/sdc with individual health data
This commit is contained in:
2025-10-22 19:59:25 +02:00
parent a6c2983f65
commit 08d3454683
4 changed files with 332 additions and 433 deletions

View File

@@ -51,7 +51,7 @@ impl MetricCollectionManager {
}
Some("systemd") => {
// Systemd collector only
let systemd_collector = SystemdCollector::new();
let systemd_collector = SystemdCollector::new(config.systemd.clone());
collectors.push(Box::new(systemd_collector));
info!("BENCHMARK: Systemd collector only");
}
@@ -88,7 +88,7 @@ impl MetricCollectionManager {
collectors.push(Box::new(disk_collector));
info!("Disk collector initialized");
let systemd_collector = SystemdCollector::new();
let systemd_collector = SystemdCollector::new(config.systemd.clone());
collectors.push(Box::new(systemd_collector));
info!("Systemd collector initialized");