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
When using the $__contains macro with a variable, you require to use the value "all" to indicates to the macro not to apply a filter there.
// if $env == "foo"
| where $__contains(env, $env)
this will become
| where env == "foo"
// if $env == "all"
| where $__contains(env, $env)
this will become
| where 1 == 1
But if you are using Prometheus in the same dashboard, the "all" value must be equal to .*.
That means that you have to either have 2 different variables for the same meaning, just with different "all" value, or to write something like:
| where "$env" == ".*" or $__contains(env, $env)
My suggestion is to have the ability to customize the "all" value in the datasource level so it could be multiple options like ("all", ".", "", etc...)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When using the $__contains macro with a variable, you require to use the value "all" to indicates to the macro not to apply a filter there.
But if you are using Prometheus in the same dashboard, the "all" value must be equal to
.*
.That means that you have to either have 2 different variables for the same meaning, just with different "all" value, or to write something like:
My suggestion is to have the ability to customize the "all" value in the datasource level so it could be multiple options like ("all", ".", "", etc...)
Beta Was this translation helpful? Give feedback.
All reactions