cm-dashboard/shared/src/envelope.rs
Christoffer Martinsson 2581435b10 Implement per-service disk usage monitoring
Replaced system-wide disk usage with accurate per-service tracking by scanning
service-specific directories. Services like sshd now correctly show minimal
disk usage instead of misleading system totals.

- Rename storage widget and add drive capacity/usage columns
- Move host display to main dashboard title for cleaner layout
- Replace separate alert displays with color-coded row highlighting
- Add per-service disk usage collection using du command
- Update services widget formatting to handle small disk values
- Restructure into workspace with dedicated agent and dashboard packages
2025-10-11 22:59:16 +02:00

23 lines
507 B
Rust

use serde::{Deserialize, Serialize};
use serde_json::Value;
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "snake_case")]
pub enum AgentType {
Smart,
Service,
Backup,
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct MetricsEnvelope {
pub hostname: String,
pub agent_type: AgentType,
pub timestamp: u64,
#[serde(default)]
pub metrics: Value,
}
// Alias for backward compatibility
pub type MessageEnvelope = MetricsEnvelope;