Remove hardcoded discovery interval in systemd collector

- Use config.interval_seconds instead of hardcoded 300 seconds
- Discovery now happens every 10 seconds (configurable) instead of 5 minutes
- Follows configuration-driven architecture requirements
This commit is contained in:
2025-10-23 13:20:48 +02:00
parent 0f12438ab4
commit c99e0bd8ee
2 changed files with 5 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ impl SystemdCollector {
monitored_services: Vec::new(),
service_status_cache: std::collections::HashMap::new(),
last_discovery_time: None,
discovery_interval_seconds: 300, // 5 minutes
discovery_interval_seconds: config.interval_seconds,
nginx_site_metrics: Vec::new(),
last_nginx_check_time: None,
nginx_check_interval_seconds: 30, // 30 seconds for nginx sites