Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$__range #752

Open
jmajoor opened this issue Mar 25, 2024 · 4 comments
Open

$__range #752

jmajoor opened this issue Mar 25, 2024 · 4 comments

Comments

@jmajoor
Copy link

jmajoor commented Mar 25, 2024

The Prometheus/Grafana $__range builtin variable doesn't seem to be supported.
My converted Grafana dashboard result in the use of in something like:
sum(increase(metric[$__range]))

This won't give any data as $__range is not understood. I don't want the ${__interval} as I want to sum over the entire selected time range in the dashboard.

Can I manually correct this or is this simply not possible in GKE using PromQL

@johnbryan
Copy link
Collaborator

I don't believe this is currently supported. One workaround might be to manually enter a range like sum(increase(metric[1h]))

@stevezease
Copy link
Collaborator

Yeah to echo John's point we currently do not have a direct equivalent. The current workaround would be to enter a manual static time range (though it will not change to match the time picker selection).

There are also some potential alternatives mentioned here, but it appear that the user in the thread was not able to get them working.
https://www.googlecloudcommunity.com/gc/Google-Cloud-s-operations-suite/Using-range-in-promql-queries/m-p/727105

@jmajoor
Copy link
Author

jmajoor commented Mar 25, 2024

Thanks for the quick response. I will use 1d for the moment.
Is there a different repository where I should report this (as this seems to be an issue with the PromQL integration rather than the conversion of dashboards)

@johnbryan
Copy link
Collaborator

No public repo, but I've passed the feedback along to the internal team responsible for promQL support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants