Oh yeah, smart idea for doing the same much easier, thanks :)

On Fri, May 1, 2020, 13:34 Aliaksandr Valialkin <[email protected]> wrote:

> Try the following Prometheus subquery
> <https://prometheus.io/blog/2019/01/28/subquery-support/>:
>
> count_over_time((CMSummary)[1h:1m]) == 60
>
>
> It should return only time series, which were available every minute
> during the last hour.
>
>
> On Fri, May 1, 2020 at 11:59 AM Julius Volz <[email protected]> wrote:
>
>> Btw. you could even modify this expression to check manually every e.g.
>> 15 minutes within the last hour, whether an IP was present at that time
>> increment within the last hour:
>>
>>     CMSummary offset 1h
>>   and
>>     CMSummary offset 45m
>>   and
>>     CMSummary offset 30m
>>   and
>>     CMSummary offset 15m
>>   and
>>     CMSummary
>>
>> So you see, theoretically you could even check every minute or so for the
>> presence, but that would become a long query...
>>
>> On Fri, May 1, 2020 at 10:55 AM Julius Volz <[email protected]>
>> wrote:
>>
>>> 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%2BT6Yow7Ka2eXx7a-VaJxDpXC8PAmTXTU3tYwnFVMzVvTe4NKA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/prometheus-users/CA%2BT6Yow7Ka2eXx7a-VaJxDpXC8PAmTXTU3tYwnFVMzVvTe4NKA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>
>
> --
> Best Regards,
>
> Aliaksandr
>

-- 
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%2BT6Yozo5o0%3DcE_y-5_90LaptBhO8MTp8c-xUyK9bvCJBEHe0Q%40mail.gmail.com.

Reply via email to