Do you also need to exclude IPs that are present at the beginning of the
hour, go missing briefly in between (as in, the time series becomes fully
absent), but are present again at the end of the hour? We don't have a way
in PromQL to check whether a series has been absent just briefly within an
interval, but is there most of the time. We have absent_over_time(), but
that only checks whether a series has been fully absent over a given time
range.

But if your IPs behave in such a way that they don't appear / disappear
that rapidly, you could check which ones were there both at the beginning
and the end of the interval:

  CMSummary offset 1h and CMSummary

On Thu, Apr 30, 2020 at 10:51 PM Arnav Bose <[email protected]> wrote:

> Hi,
>
> I know I can check in the graph how long the metric has been available. In
> my case I want to create a query which will list down the data for a metric
> which has been available for an hour, excluding the ones which at least
> went down/missing during the same period.
>
> Here is my metric - CMSummary{ipAddr="$$$"}. There are at least 20000
> different IP sources with this metric. I want to know which ones have been
> available for the last 1 hr.
>
>
> Thanks,
> Arnav
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Prometheus Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/d21d5adf-0307-4367-b050-ec81cf0ce8b2%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/d21d5adf-0307-4367-b050-ec81cf0ce8b2%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CA%2BT6YoxqDfBWNSYEVfMyir65KmtgOTArbXd-yYMHNpEXP7%2BTAA%40mail.gmail.com.

Reply via email to