On Thursday, 26 March 2020 19:17:18 UTC, Chris Featherstone wrote:
>
> Thanks Brian,
>
> 'replication_read_duration_seconds' is a gauge and it updates every time 
> this exporter is hit by prometheus (30s right now).
>

Giving the value of the most recent replication event presumably.  Do the 
replications themselves only happen once per 30s, or more often?

If they only happen every 30s then you can work along the lines of the 
formula you were building, but the 5-minute average will only have a 
resolution of 30/300 = 10%.

 

> I was trying to see if I could somehow make our current metrics work, but 
> its pretty clear that I need the total count (and histogram).
>
> The current metrics report duration on only this individual scrape. So to 
> get anything meaningful I need to know the results of every attempt. Kind 
> of like two buckets, 0-5ms, and 5ms-Inf.
>

Yep, that's almost exactly how a histogram works. The standard in 
prometheus is that the buckets overlap, so you'll have 0-5ms and 0-Inf, but 
the principle is the same.

(1) replication_read_duration_seconds_bucket{le="0.005"}
(2) replication_read_duration_seconds_bucket{le="+Inf"}
(3) replication_read_duration_seconds_sum
(4) replication_read_duration_seconds_count

(3) allows the average to be calculated. (2) is the same as (4).

-- 
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/dcb8511e-1c01-4669-bdfe-bad9bd44b637%40googlegroups.com.

Reply via email to