Fix compilation error in nginx site status handling
This commit is contained in:
parent
77795c44d3
commit
e64527ce2f
@ -1360,10 +1360,17 @@ impl Collector for ServiceCollector {
|
||||
|
||||
// Determine status and description based on latency measurement
|
||||
let (site_status, site_description) = match latency {
|
||||
Some(ms) => (ServiceStatus::Running, None),
|
||||
Some(_ms) => (ServiceStatus::Running, None),
|
||||
None => (ServiceStatus::Stopped, Some(vec!["unreachable".to_string()])),
|
||||
};
|
||||
|
||||
// Update counters based on site status
|
||||
match site_status {
|
||||
ServiceStatus::Running => healthy += 1,
|
||||
ServiceStatus::Stopped => failed += 1,
|
||||
_ => degraded += 1,
|
||||
}
|
||||
|
||||
services.push(ServiceData {
|
||||
name: site.clone(),
|
||||
status: site_status,
|
||||
@ -1379,13 +1386,6 @@ impl Collector for ServiceCollector {
|
||||
sub_service: Some("nginx".to_string()),
|
||||
latency_ms: latency,
|
||||
});
|
||||
|
||||
// Update counters based on site status
|
||||
match site_status {
|
||||
ServiceStatus::Running => healthy += 1,
|
||||
ServiceStatus::Stopped => failed += 1,
|
||||
_ => degraded += 1,
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user