You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Its a common pattern to see matchers which match everything (eg instance=~".*") in queries, as people like to use multi-selects in grafana and then select "all", which results in this.
We should just ignore them - no reason to even look in the index for this matcher, it was not intersectional power.
The text was updated successfully, but these errors were encountered:
Not that I know of; it'd be pretty hard to implement in Grafana, as it currently doesn't manipulate the query - this is implemented as a variable substitution (ie instance=~"$instance"). Anyway I checked it out and this isn't coming from Grafana - when you select "All" in a multiselect it subs in the form a|b|c.
I found one in our Grafana dashboards - there is a drop-down for pods, and the defined query is:
sum by (namespace,pod_name) (container_memory_usage_bytes{container_name!="POD",container_name!="",instance="$instance",pod_name=~"${pods:regex}"})
and when pods is set to "All" the Query Inspector shows (after decoding):
https://cloud.weave.works/api/prom/api/v1/query_range?query=sum by (namespace,pod_name) (container_memory_usage_bytes{container_name!="POD",container_name!="",instance="ip-172-20-2-42.ec2.internal",pod_name=~".+"})&start=1536745080&end=1536748680&step=30
I've tried to introduce this optimization in Prometheus, but it turns out it's not valid, because there are values that ".*" regex doesn't match, specifically values that include newline character.
Its a common pattern to see matchers which match everything (eg
instance=~".*"
) in queries, as people like to use multi-selects in grafana and then select "all", which results in this.We should just ignore them - no reason to even look in the index for this matcher, it was not intersectional power.
The text was updated successfully, but these errors were encountered: