Jelly
Jelly

Reputation: 1298

Grafana: human readable name of custom variable

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?

Upvotes: 0

Views: 517

Answers (1)

Jan Garaj
Jan Garaj

Reputation: 28656

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.

Upvotes: 1

Related Questions