Make nginx site latency thresholds configurable and simplify status logic
All checks were successful
Build and Release / build-and-release (push) Successful in 4m25s
All checks were successful
Build and Release / build-and-release (push) Successful in 4m25s
- Replace hardcoded 500ms/2000ms thresholds with configurable nginx_latency_critical_ms - Simplify status logic to only OK or Critical (no Warning status) - Add validation for nginx latency threshold configuration - Re-enable nginx site collection with configurable thresholds - Resolves issue where sites showed critical at 2000ms despite 30s timeout setting - Bump version to v0.1.38
This commit is contained in:
@@ -555,10 +555,8 @@ impl SystemdCollector {
|
||||
for (site_name, url) in &sites {
|
||||
match self.check_site_latency(url) {
|
||||
Ok(latency_ms) => {
|
||||
let status = if latency_ms < 500.0 {
|
||||
let status = if latency_ms < self.config.nginx_latency_critical_ms {
|
||||
Status::Ok
|
||||
} else if latency_ms < 2000.0 {
|
||||
Status::Warning
|
||||
} else {
|
||||
Status::Critical
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user