Agent improvements: - Add reqwest dependency for HTTP latency testing - Implement measure_site_latency() function for nginx sites - Add latency_ms field to ServiceData structure - Measure response times for nginx sites using HEAD requests - Handle connection failures gracefully with 5-second timeout - Use HTTPS for external sites, HTTP for localhost Dashboard improvements: - Add latency_ms field to ServiceInfo structure - Display latency for nginx sites: "docker.cmtec.se 134ms" - Only show latency for nginx sub-services, not other services - Change disk usage "0" to "<1MB" for better readability The Services widget now shows: - Nginx sites with response times when measurable - Cleaner disk usage formatting for small values - Improved user experience with meaningful latency data
26 lines
773 B
TOML
26 lines
773 B
TOML
[package]
|
|
name = "cm-dashboard-agent"
|
|
version = "0.1.0"
|
|
edition = "2021"
|
|
|
|
[dependencies]
|
|
cm-dashboard-shared = { path = "../shared" }
|
|
anyhow = "1.0"
|
|
async-trait = "0.1"
|
|
clap = { version = "4.0", features = ["derive"] }
|
|
serde = { version = "1.0", features = ["derive"] }
|
|
serde_json = "1.0"
|
|
chrono = { version = "0.4", features = ["serde", "clock"] }
|
|
chrono-tz = "0.8"
|
|
thiserror = "1.0"
|
|
tracing = "0.1"
|
|
tracing-subscriber = { version = "0.3", features = ["fmt", "env-filter"] }
|
|
tracing-appender = "0.2"
|
|
zmq = "0.10"
|
|
tokio = { version = "1.0", features = ["full", "process"] }
|
|
futures = "0.3"
|
|
rand = "0.8"
|
|
gethostname = "0.4"
|
|
lettre = { version = "0.11", default-features = false, features = ["smtp-transport", "builder"] }
|
|
reqwest = { version = "0.11", features = ["json"] }
|