diff --git a/README.md b/README.md index 349b983..fb2131c 100644 --- a/README.md +++ b/README.md @@ -357,13 +357,16 @@ Fires when any filesystem drops below 20% free space. #### Container restarting -Fires when any container's start time changes more than 3 times in 10 minutes, indicating repeated restarts. +Fires when any container restarts more than 3 times in 10 minutes, indicating a crash loop. +Detects both in-place restarts (`docker restart`) and ID-changing restarts (`docker compose down/up`). Requires cAdvisor (included in the monitoring stack). - **Data source:** Prometheus - **Query (A):** ```promql - changes(container_start_time_seconds{name!=""}[10m]) + sum by (name) (changes(container_start_time_seconds{name!=""}[10m])) + + + count by (name) (count_over_time(container_start_time_seconds{name!=""}[10m])) - 1 ``` - **Expression (B):** Threshold — `A IS ABOVE 3` - **Evaluate every:** `1m`