Home > Software engineering >  Grafana: human readable name of custom variable
Grafana: human readable name of custom variable

Time:11-24

I have a task to create custom (not Query!) Grafana variable with values, which to be used in sql where clause.

Assume, values are:

      is null, is not null,  is null or is not null

And in drop-down list user must see "human readable" titles:

     'Empty', 'Not Empty', 'All'.

I found, how this problem solved for sql-query variables. But it's not my case, obviously.

As a solution I tried to write in "Values separated by comma" the following:

 Empty: is null,
 Not Empty: is not null,
 All: is null or is not null

But it does not work: in drop-down list I see this key-values pairs: "Empty: is null, ..."

What am I doing wrong?

CodePudding user response:

Custom type variable must have specific value/format (works fine for Grafana 8.2.4, it may not be supported by lower Grafana major versions):

Empty : is null, Not Empty : is not null, All : is null or is not null

Spaces are important.

  • Related