xpt
August 23, 2022, 8:09pm
1
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
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” ?
Query Inspector is a new feature that was added to Grafana v4.5. It shows query requests and responses.
This can be helpful if a graph is not shown or shows something very different than what you expected.
Depending on the data source the response will look different.
The Query Inspector can be found under the metrics tab inside panel edit mode.
First you should check and see if there is anything unexpected or wrong in the query Grafana sends to your database or in the response.
ex:
[imag…
Check if your $var have the value expected
xpt
August 24, 2022, 2:00pm
3
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
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.
xpt
August 24, 2022, 7:51pm
7
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!