I'm testing switching from prometheus to using victoria metrics.
In prometheus, my promQL:
(sum(rate(demo_service_request_duration_seconds_bucket{le=\"0.5\"}[5m])) by (exported_job) / sum(rate(demo_service_request_duration_seconds_count[5m])) by (exported_job))
And display like this:
But in victoria metrics not have "le" label to use.
How can i convert from old promQL for new promQL use vmrange label.
Tksssssss so much !!!!!
Try the following MetricsQL query:
It uses histogram_share function for returning the share of requests with the duration smaller or equal to 0.5 seconds during the last 5 minutes (see
5m
in square brackets). The share is returned individually per eachexported_job
. Every share is returned in the range[0...1]
, where 0 means 0% of requests and 1 means 100% of requests.