Can we apply any conditions for custom variables

Hello,

Data Source: Postgres and Prometheus

I want to create a custom variable and it should be key-value pair. Can I add any conditions here?

My requirement was: the dropdown of the custom variable will be: All, … , …
If I select “ALL” then wherever I am passing this variable in the query then it should ignore or can consider this as no condition or null value.

Can we do this ?

Thanks & regards,
Bharath Kumar.

Here is how you would create a variable

image

Which data source will you be querying with this variable? Postgres or Prometheus?

1 Like

I am querying for Prometheus.