Add agent hash display to system panel

Implement agent version tracking to diagnose deployment issues:
- Add get_agent_hash() method to extract Nix store hash from executable path
- Collect system_agent_hash metric in NixOS collector
- Display "Agent Hash" in system panel under NixOS section
- Update metric filtering to include agent hash

This helps identify which version of the agent is actually running
when troubleshooting deployment or metric collection issues.
This commit is contained in:
2025-10-23 17:33:45 +02:00
parent 4193a97737
commit c5ec529210
3 changed files with 55 additions and 1 deletions

View File

@@ -119,7 +119,7 @@ impl TuiApp {
// Add NixOS metrics - using exact matching for build display fix
let nixos_metrics: Vec<&Metric> = all_metrics
.iter()
.filter(|m| m.name == "system_nixos_build" || m.name == "system_active_users")
.filter(|m| m.name == "system_nixos_build" || m.name == "system_active_users" || m.name == "system_agent_hash")
.copied()
.collect();
system_metrics.extend(nixos_metrics);