count_over_time

17 views
Skip to first unread message

Альберт Александров

unread,
Jul 2, 2020, 8:54:04 AM7/2/20
to Prometheus Users

Hi all!


I have such individual metrics:


photo_2020-07-02_15-37-48.jpg


As you can see they differ from each other with gauge_index label. 

I would like to count them over time. I tried this:

count_over_time(platform_asusg_send_status{cluster="clover-test-selectel"}[5m])

But this returns as much graphs as the amount of gauge_index. I mean I would like to get a single graph as if there was no gauge_index label.

Could you say please how can I reach this? 

Mat Arye

unread,
Jul 2, 2020, 9:20:21 AM7/2/20
to Альберт Александров, Prometheus Users
Hi Albert,

I believe you need an additional layer of aggregation to combine series with different gauage_index labels ;  something like this:

sum without (gauge_index) (
     count_over_time(platform_asusg_send_status{cluster="clover-test-selectel"}[5m])
)

--
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 prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/cca51c6a-8363-40a7-84de-320fe396d9dbo%40googlegroups.com.


--
Mat Arye, Timescale-Prometheus Team Lead
See what we're working on (feedback welcome!): tsdb.co/prom-design-doc

Альберт Александров

unread,
Jul 2, 2020, 10:12:05 AM7/2/20
to Prometheus Users
You did my day. Thanx a lot)

четверг, 2 июля 2020 г., 16:20:21 UTC+3 пользователь Mat Arye написал:
Hi Albert,

I believe you need an additional layer of aggregation to combine series with different gauage_index labels ;  something like this:

sum without (gauge_index) (
     count_over_time(platform_asusg_send_status{cluster="clover-test-selectel"}[5m])
)

On Thu, Jul 2, 2020 at 8:54 AM Альберт Александров <yakhsh...@yandex.ru> wrote:

Hi all!


I have such individual metrics:


photo_2020-07-02_15-37-48.jpg


As you can see they differ from each other with gauge_index label. 

I would like to count them over time. I tried this:

count_over_time(platform_asusg_send_status{cluster="clover-test-selectel"}[5m])

But this returns as much graphs as the amount of gauge_index. I mean I would like to get a single graph as if there was no gauge_index label.

Could you say please how can I reach this? 

--
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 promethe...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages