How to set alert for docker container stop and start using promql in grafana dashboard?

Hi,

I am using grafana dashboard,I set the alert for the docker container start and stop in query.But the status is showing no data results.Whether the container manually stopped, then the status is showing pending state after getting alert for the below query.

absent(container_last_seen{instance=“XXXXXX”,name=“container name”})

conditions:
when avg is above 0

OR avg is below 1.

The above condition is satisfies the down alert. But container start is not coming to OK state.
Anyone share the start query for docker container start alert in grafana dashboard?

Regards,
BalaS

1 Like