Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| bea2d120b5 | |||
| 5394164123 | |||
| 4329cd26e0 |
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -279,7 +279,7 @@ checksum = "a1d728cc89cf3aee9ff92b05e62b19ee65a02b5702cff7d5a377e32c6ae29d8d"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard"
|
name = "cm-dashboard"
|
||||||
version = "0.1.133"
|
version = "0.1.136"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"chrono",
|
"chrono",
|
||||||
@@ -301,7 +301,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard-agent"
|
name = "cm-dashboard-agent"
|
||||||
version = "0.1.133"
|
version = "0.1.136"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
@@ -324,7 +324,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cm-dashboard-shared"
|
name = "cm-dashboard-shared"
|
||||||
version = "0.1.133"
|
version = "0.1.136"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"chrono",
|
"chrono",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard-agent"
|
name = "cm-dashboard-agent"
|
||||||
version = "0.1.134"
|
version = "0.1.137"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -78,11 +78,10 @@ impl Agent {
|
|||||||
info!("Initial metric collection completed - all data cached and ready");
|
info!("Initial metric collection completed - all data cached and ready");
|
||||||
}
|
}
|
||||||
|
|
||||||
// Separate intervals for collection, transmission, heartbeat, and email notifications
|
// Separate intervals for collection, transmission, and email notifications
|
||||||
let mut collection_interval =
|
let mut collection_interval =
|
||||||
interval(Duration::from_secs(self.config.collection_interval_seconds));
|
interval(Duration::from_secs(self.config.collection_interval_seconds));
|
||||||
let mut transmission_interval = interval(Duration::from_secs(self.config.zmq.transmission_interval_seconds));
|
let mut transmission_interval = interval(Duration::from_secs(self.config.zmq.transmission_interval_seconds));
|
||||||
let mut heartbeat_interval = interval(Duration::from_secs(self.config.zmq.heartbeat_interval_seconds));
|
|
||||||
let mut notification_interval = interval(Duration::from_secs(self.config.notifications.aggregation_interval_seconds));
|
let mut notification_interval = interval(Duration::from_secs(self.config.notifications.aggregation_interval_seconds));
|
||||||
|
|
||||||
loop {
|
loop {
|
||||||
@@ -99,12 +98,6 @@ impl Agent {
|
|||||||
error!("Failed to broadcast metrics: {}", e);
|
error!("Failed to broadcast metrics: {}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
_ = heartbeat_interval.tick() => {
|
|
||||||
// Send standalone heartbeat for host connectivity detection
|
|
||||||
if let Err(e) = self.send_heartbeat().await {
|
|
||||||
error!("Failed to send heartbeat: {}", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ = notification_interval.tick() => {
|
_ = notification_interval.tick() => {
|
||||||
// Process batched email notifications (separate from dashboard updates)
|
// Process batched email notifications (separate from dashboard updates)
|
||||||
if let Err(e) = self.host_status_manager.process_pending_notifications(&mut self.notification_manager).await {
|
if let Err(e) = self.host_status_manager.process_pending_notifications(&mut self.notification_manager).await {
|
||||||
@@ -187,9 +180,7 @@ impl Agent {
|
|||||||
let version_metric = self.get_agent_version_metric();
|
let version_metric = self.get_agent_version_metric();
|
||||||
metrics.push(version_metric);
|
metrics.push(version_metric);
|
||||||
|
|
||||||
// Add heartbeat metric for host connectivity detection
|
// Heartbeat removed - dashboard detects connectivity via regular transmission timestamps
|
||||||
let heartbeat_metric = self.get_heartbeat_metric();
|
|
||||||
metrics.push(heartbeat_metric);
|
|
||||||
|
|
||||||
// Check for user-stopped services that are now active and clear their flags
|
// Check for user-stopped services that are now active and clear their flags
|
||||||
self.clear_user_stopped_flags_for_active_services(&metrics);
|
self.clear_user_stopped_flags_for_active_services(&metrics);
|
||||||
|
|||||||
@@ -74,7 +74,8 @@ pub struct DiskConfig {
|
|||||||
pub usage_warning_percent: f32,
|
pub usage_warning_percent: f32,
|
||||||
/// Disk usage critical threshold (percentage)
|
/// Disk usage critical threshold (percentage)
|
||||||
pub usage_critical_percent: f32,
|
pub usage_critical_percent: f32,
|
||||||
/// Filesystem configurations
|
/// Filesystem configurations (optional - auto-discovery used if empty)
|
||||||
|
#[serde(default)]
|
||||||
pub filesystems: Vec<FilesystemConfig>,
|
pub filesystems: Vec<FilesystemConfig>,
|
||||||
/// SMART monitoring thresholds
|
/// SMART monitoring thresholds
|
||||||
pub temperature_warning_celsius: f32,
|
pub temperature_warning_celsius: f32,
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard"
|
name = "cm-dashboard"
|
||||||
version = "0.1.134"
|
version = "0.1.137"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@@ -263,7 +263,7 @@ impl SystemWidget {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if !drive_details.is_empty() {
|
if !drive_details.is_empty() {
|
||||||
format!("{} ({})", pool.name, drive_details.join(" "))
|
format!("{} {}", pool.name, drive_details.join(" "))
|
||||||
} else {
|
} else {
|
||||||
pool.name.clone()
|
pool.name.clone()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "cm-dashboard-shared"
|
name = "cm-dashboard-shared"
|
||||||
version = "0.1.134"
|
version = "0.1.137"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
Reference in New Issue
Block a user