From dfe9c1110223a6622ca7f1e8939545e36a06a0b4 Mon Sep 17 00:00:00 2001 From: Christoffer Martinsson Date: Mon, 20 Oct 2025 10:07:34 +0200 Subject: [PATCH] Fix disk metric naming to maintain dashboard compatibility Keep numbered metric names (disk_0_*, disk_1_*) instead of named metrics (disk_root_*, disk_boot_*) to ensure existing dashboard continues working. UUID-based detection works internally but produces compatible metric names. --- agent/src/collectors/disk.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/agent/src/collectors/disk.rs b/agent/src/collectors/disk.rs index 361be37..0328c9f 100644 --- a/agent/src/collectors/disk.rs +++ b/agent/src/collectors/disk.rs @@ -375,10 +375,8 @@ impl Collector for DiskCollector { for (disk_index, disk) in mounted_disks.iter().enumerate() { let timestamp = chrono::Utc::now().timestamp() as u64; - // Use config name if available, otherwise use index - let disk_name = disk.config_name.as_ref() - .map(|name| name.clone()) - .unwrap_or_else(|| disk_index.to_string()); + // Always use index for metric names to maintain dashboard compatibility + let disk_name = disk_index.to_string(); // Parse size strings to get actual values for calculations let size_gb = self.parse_size_to_gb(&disk.size);