The problem is that the `container_last_seen` time series will be kept
around for the duration of the staleness timeout (this is configurable
via a flag, but hold on).
The `[15s]` syntax won't help with count().
This will give you all containers that have not been seen in the last
15 seconds but have not fallen off the staleness cliff:
container_last_seen < (time() - 15)
It will however not return exactly 1 or 0 – why do you need that?
to check only for a single container, and also return something if it
is completely missing (staleness timeout has hit):
(container_last_seen{name=~"(?i)ubuntu"} < (time() - 15)) OR
absent(container_last_seen{name=~"(?i)ubuntu"})
/MR
> --
> 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.
> 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