Fix sparkline service name mapping
- Pass service names (not slugs) to DockerStatsCollector - Create slug->name mapping for sparkline lookups - Stats are stored by service name, looked up by slug - Add debug logging when no containers found
This commit is contained in:
@@ -201,7 +201,7 @@ class DockerStatsCollector:
|
||||
refresh_counter = 0
|
||||
|
||||
while self._running:
|
||||
# Refresh container mapping every 30 iterations (~60 seconds)
|
||||
# Refresh container mapping every 30 iterations (~5 minutes at 10s interval)
|
||||
if refresh_counter % 30 == 0:
|
||||
service_to_container = await self._discover_containers(service_names)
|
||||
if service_to_container:
|
||||
@@ -209,6 +209,11 @@ class DockerStatsCollector:
|
||||
"Discovered containers: %s",
|
||||
", ".join(f"{k}={v}" for k, v in service_to_container.items()),
|
||||
)
|
||||
else:
|
||||
log.debug(
|
||||
"No containers found for services: %s",
|
||||
", ".join(service_names),
|
||||
)
|
||||
|
||||
refresh_counter += 1
|
||||
|
||||
|
||||
Reference in New Issue
Block a user