They could live for 5s or 1 hour. Does it really matter what you send to pushgateway? It supports counters so why not push them?
A TTL is all we need here. On Sat, Jul 1, 2023 at 5:32 PM Bjoern Rabenstein <[email protected]> wrote: > On 29.06.23 08:47, 'Braden Schaeffer' via Prometheus Developers wrote: > > It's the same as calculating the total incoming request rate of N pods > in a > > deployment: sum(rate(grpc_request_count{service=foo}[5m])) > > 🤔 I'm surprised that you seem to push a counter metric to the > Pushgateway. > > I would say the intended use case for the Pushgateway is that a > batch job pushes its metrics upon completion. That means you only ever > have one value of those metrics, so a `rate` on those would always > result in zero. > > Are you perhaps pushing multiple times during the runtime of your > batch jobs? That would be weird indeed for a PGW use case. Why don't > you just scrape your jobs normally then? > > -- > Björn Rabenstein > [PGP-ID] 0x851C3DA17D748D03 > [email] [email protected] > -- You received this message because you are subscribed to the Google Groups "Prometheus Developers" 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-developers/CAKG2A1cBTOk_wrJi%2B2uO_2y6LKG0t0AMpMptBCdM6yTR_cTDxg%40mail.gmail.com.

