I believe something like the following PromQL query should work for your
case:

sum(rate(metric[5m]))

Note that you cannot swap sum() and rate() in the query in general case,
since this can give unexpected results. See
https://www.robustperception.io/rate-then-sum-never-sum-then-rate for
details.

On Wed, Feb 26, 2020 at 4:37 PM 'Avner Adania' via Prometheus Users <
prometheus-users@googlegroups.com> wrote:

> i'm trying to apply two function on one metric.
> For example:
>
> i would like to get a perSecond(Graphite function) on a sumSeries function:
>
> perSecond(sumSeries(prefix.region.cluster.metric_name.*.offset),"Rate")
>
> Question is how to apply two or more functions on one metric?
>
> --
> 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-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/prometheus-users/51a596fb-67d1-45d8-a069-19c94fc2a211%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/51a596fb-67d1-45d8-a069-19c94fc2a211%40googlegroups.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 prometheus-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/prometheus-users/CAPbKnmBg%2B-yyPf7PPxZvyyTfyiZf7WrHXLeCUo7sax3RdAPZig%40mail.gmail.com.

Reply via email to