To calculate p99 over a specific time period using PromQL, you can use the following syntax:
histogram_quantile(0.99, sum(rate(metric_name_bucket[time_range])) by (le))
Where metric_name
is the name of the metric you want to calculate p99 for, time_range
is the time period over which to calculate p99, and le
is the label that represents bucket boundaries in the histogram.
For example, to calculate the p99 of the http_request_duration_seconds
metric over the last 5 minutes, you can use the following query:
histogram_quantile(0.99, sum(rate(http_request_duration_seconds_bucket[5m])) by (le))
This will return the p99 value for the http_request_duration_seconds
metric over the last 5 minutes.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-05-03 02:26:50 +0000
Seen: 11 times
Last updated: May 03 '23
If a field falls outside a specific range, what is the method to calculate its sum?
What is the method to calculate the total of two whole numbers in the programming language C?
What is the best method to calculate mutual information for pairs using numpy?
Is it possible for you to assist me with understanding the time complexity?
At compile time, how can I change a C string into an integer?
What is the process to activate the screen time off feature in Android using AOSP customization?
What is the meaning of charged_seconds and compute_seconds in Redshift serverless?