In Prometheus sometimes we need to plot several metrics at onces (say, having name, fitting the same regex) like that PromQL query:
{name=~"camel_proxy.*count"}
and it works fine, the same labelset lines are plotted with the different names.
When we want to plot the rate() of them, we face the error from the title:
rate({name=~"camel_proxy.*count"}[5m])
So, the way here is to make labelset not the same, and to move the __name__ to some label, making each labelset to be unique:
rate(label_replace({name=~"camel_proxy.*count"},"name_label","$1","name", "(.+)")[5m])
But we are still getting the error like
1:90: parse error: ranges only allowed for vector selectors"
How to avoid it and plot the rates correctly?