[forwarding message manually: for some reason it arrived at mine but not
in the list]
On 18/03/2023 07:43, Liu Bo wrote:
Brian Candler <[email protected]> writes:
You should never use any scrape interval greater than 2 minutes. Prometheus
considers data
more than 5 minutes old as "stale", unless you've tweaked other settings (and
it's not
recommended).
https://www.robustperception.io/keep-it-simple-scrape_interval-id/
Thanks, I just know it today and didn't find it's document before,
missed that I think.
Don't worry about storage. Prometheus compresses extremely efficiently, so
even if you scrape
the same data 30 times, the delta between them is zero and it will take almost
no storage space
at all.
Yeah we don't worry about about storage, actuall we are worry about
bandwidth cost, it because we are trying to get kubernetes metris(mainly
for cost) form customer's cloud cluster(GCP, AWS etc...), and generate a
cost report for our customer.
The report's min time step is Hour so I set scrape_interval to 1h, and
I think we and our customer both can't accept the bandwidth cost form
prometheus if scrape_interval is 1m or 2m.
And I found that I can use function last_over_time to get last metric in
an hour and ignore this's metric specific timestamp.
I set last_over_time range to 1h, and then set Step to 1h, then got
one metric per hour, and if I want get one metric per day I can set Step
to 24h, it seems work.
But now I have some confused about this Step parameter, document here:
https://prometheus.io/docs/prometheus/latest/querying/api/#range-queries
I try to set step to 1m and prometheus give me metrics back with per
minute.
How prometheus group data to per minute?
I mean I set scrape_interval to 1h and it should be just one metric in
an hour right?
--
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/5cc289ba-946a-2de0-4a64-df48ca6e13dd%40pobox.com.