Remove nginx site accessibility filtering to monitor all sites
- Remove check_site_accessibility function and filtering logic - Monitor ALL nginx sites from config regardless of current status - Site status determined by measure_site_latency, not accessibility filter - Fixes missing git.cmtec.se when backend is down (502 errors) - Sites with errors now show as failed instead of being filtered out
This commit is contained in:
@@ -109,10 +109,17 @@ fn render_metrics(
|
||||
// Add latency information for nginx sites if available
|
||||
let service_name_with_latency = if let Some(parent) = &svc.sub_service {
|
||||
if parent == "nginx" {
|
||||
// Extract subdomain part for shorter display
|
||||
let short_name = if let Some(dot_pos) = svc.name.find('.') {
|
||||
&svc.name[..dot_pos]
|
||||
} else {
|
||||
&svc.name
|
||||
};
|
||||
|
||||
match &svc.latency_ms {
|
||||
Some(latency) if *latency >= 2000.0 => format!("{} → unreachable", svc.name), // Timeout (2s+)
|
||||
Some(latency) => format!("{} → {:.0}ms", svc.name, latency),
|
||||
None => format!("{} → unreachable", svc.name), // Connection failed
|
||||
Some(latency) if *latency >= 2000.0 => format!("{} → unreachable", short_name), // Timeout (2s+)
|
||||
Some(latency) => format!("{} → {:.0}ms", short_name, latency),
|
||||
None => format!("{} → unreachable", short_name), // Connection failed
|
||||
}
|
||||
} else {
|
||||
svc.name.clone()
|
||||
|
||||
Reference in New Issue
Block a user