Reversing the variables

  • What Grafana version and what operating system are you using?

v9.1

  • What are you trying to achieve?

Reversing the variables

  • How are you trying to achieve it?

Reversing the variables

  • What happened?

I have two variables for my dashboard, defined in the order of:

runId: SHOW TAG VALUES FROM "requestsRaw" WITH KEY="runId"
test: SHOW TAG VALUES FROM "requestsRaw" WITH KEY = "testName" WHERE runId =~ /$runs/

But I want to reverse the variable definition order so as runId from/depends-on test:

test:
SHOW TAG VALUES FROM "requestsRaw" WITH KEY="testName"
runId: SHOW TAG VALUES FROM "requestsRaw" WITH KEY="runId" WHERE testName =~ "/$test/"
  • What did you expect to happen?

runId depends-on test, and only show limited selection from the test only.

  • Can you copy/paste the configuration(s) that you are having problems with?

but the

SHOW TAG VALUES FROM "requestsRaw" WITH KEY="runId" WHERE testName =~ "/$test/"

is not behaving as I wanted.

I even changed it to:

WHERE testName =~ "/./"

or,

WHERE test =~ "/./"

but still I got “none” as the result.

Remove the WHERE clause will get outputs, but they are just not only limited to the test I selected.

  • Did you receive any errors in the Grafana UI or in related logs? If so, please tell us exactly what they were.

no.

hello,
is this working in influx directly ?
Did you visulise your query format with the feature “query inspector” ?

Check if your $var have the value expected

Thanks for the reply.

Yes to both.

Yest, this is working in influx directly
Yes, I visulise my query format with the feature “query inspector”, but still I got “none” as the result.

then copy the query given by the query inspector and use it in influx directly, you should have the same result.
or maybe you disabled your query too by clicking on the little eye button above the query text

What went wrong pls?

you can see on your screen you don’t use the same query in influx,
i bet if you use the exact same query you have the same result.
image
image

:slight_smile:

Ha, Just like that!
I got overwhelmed by the vast amount of info that I need to look into and forgot to examine something so obvious. thanks!