Added
Per-container CPU and memory stats -
ContainerInfonow includes individual resource usage for each containerPrometheus metric
watcher_invalid_services_total- tracks count of services that failed config validationContainer ID field added to
ContainerInfostruct for resource stats lookup
Fixed
CRITICAL: Web UI template error - added missing
Nowfield touiDatastruct (template rendering was completely broken)CPU/memory stats now displayed per-container instead of aggregated at service level
Monitor now stores per-container resource usage keyed by container ID
Changed
Resource stats collection enhanced to track individual container metrics
API enriches container list with CPU/memory stats from monitor
Container details in web UI now show accurate per-container resource usage
Technical Details
Per-Container Stats Implementation
The monitor now maintains two maps:
latest map[string]ServiceStats- Service-level aggregated stats (unchanged)containerStats map[string]ContainerStats- Per-container stats keyed by container ID API flow:- Monitor collects stats for each container and stores by ID
- Updater lists containers and includes container ID in
ContainerInfo - API enriches containers with stats during snapshot creation
- Web UI displays CPU/memory per container in expandable details
Invalid Services Metric
New Prometheus metric exposed via
/metrics:# HELP watcher_invalid_services_total Number of services that failed config validation # TYPE watcher_invalid_services_total gauge watcher_invalid_services_total 1Enables alerting on misconfigured services that were skipped during startup.