Fix disk collector to use dynamic device detection
- Remove underlying_devices field from FilesystemConfig - Add device detection at startup using findmnt command - Store detected devices in HashMap for reuse during collection - Keep all existing functionality (StoragePool, DriveInfo, SMART data) - Detect devices only once at initialization, not every collection cycle - Fixes agent startup failure due to missing underlying_devices config
This commit is contained in:
@@ -86,7 +86,6 @@ pub struct FilesystemConfig {
|
||||
pub fs_type: String, // "ext4", "zfs", "xfs", "mergerfs", "btrfs"
|
||||
pub monitor: bool,
|
||||
pub storage_type: String, // "single", "raid", "mirror", "mergerfs", "zfs"
|
||||
pub underlying_devices: Vec<String>, // ["sda", "sdb", "sdc"] or ["nvme0n1"]
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user