rate((counter > 0)[20m:])

Subqueries can help but you will stumble upon many other issues with this.
Please try to fix the exporter.

Le ven. 12 juin 2020 à 22:30, Tim Harrison <[email protected]> a écrit :

> I have a "bad" counter that I'm trying to apply an increase to.  That
> counter occasionally does not appear on the exporter page for various
> reasons and so prometheus records it as a 0.  Due to this, the data appears
> to go 1000,0,2000,2500,0,3000,3500 and so on.  When I apply an increase, i
> get these huge spikes because every time a zero occurs, it thinks the
> increase is from 0 to 3000 rather than from 2500 to 3000.  I need to figure
> out if there's a way to filter out the zeros (or make them equal to the
> last non-zero value) before applying the increase function.  Thanks.
>
> --
> 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/1ef232e1-390e-482a-be71-9cf94f628500o%40googlegroups.com
> <https://groups.google.com/d/msgid/prometheus-users/1ef232e1-390e-482a-be71-9cf94f628500o%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/CAFJ6V0oqhrtm9xZg2xqPZcKfJgR9wNhHwmJ%3DB%3DPsQYVEJ2_0FQ%40mail.gmail.com.

Reply via email to