I've set up a Prometheus instance using docker, I also set up an cadvisor instance to export data to Prometheus.
I'm trying to set an alert rule to fire when any of my running containers stop, but it only works when I specify the container name.
The problem is that I have a lot of running containers and it would take too long to set all of them up, I've already tried a filter in the query like this:
absent(((time() - container_last_seen{name=~"dockito"}) < 5))
and my current and working rule looks like this:
ALERT dockit
IF absent(((time() - container_last_seen{name="dockito-vault"}) < 5))
FOR 15s
SUMMARY "Instance {{$labels.instance}} down"
DESCRIPTION "{{$labels.instance}} of job {{$labels.job}} has been down for more than 5 minutes."
Can anyone help me?
Thanks in advance.
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
Hi all!I have exactly the same question, so I chose not to start a new thread :)I have several containers with common part in names, on different instances. And I still need to know if any of this containers are down.I created alert rule:ALERT ContainerIsDownIF absent(((time() - container_last_seen{name=~".*commonpart.*"}) < 5)) FOR 15sLABELS {instance = "vm1",}ANNOTATIONS {summary = "Container {{$labels.name}} is down",description = "You should do something"}Here is my question. How can I get information in alert what container on what instance is down? Is it possible without labels? Or maybe I can use variables in labels?For now I'm getting messages like this: "[FIRING:1] ContainerIsDown (vm1)", but I want to get them like this "[FIRING:1] ContainerIsDown (vm1 container_name)". Is it possible?
Thank you in advance!!
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
Matthias Rampke
Engineer
SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany | +49
173 6395215
Managing Director: Alexander Ljung | Incorporated in England & Wales
with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
HRB 110657B
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
Thank you in advance!!
> To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
--
Matthias Rampke
Engineer
SoundCloud Ltd. | Rheinsberger Str. 76/77, 10115 Berlin, Germany | +49
173 6395215
Managing Director: Alexander Ljung | Incorporated in England & Wales
with Company No. 6343600 | Local Branch Office | AG Charlottenburg |
HRB 110657B
--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.