Reputation: 78
I have two template variables and I want that after selecting first template variable from dropdown, second template variable should be dynamic based on first variable value.
let me clear this scenario with an example: assume I have this data:
data=> System=10
tags=> appName="a", appVersion="1.1"
data=> System=12
tags=> appName="b", appVersion="2.1"
I have defined two template variables :appName: and :appVersion: and Im getting their values using this meta query
SHOW TAG VALUES ON "db_name" FROM "measurement_name" WITH KEY = appName
SHOW TAG VALUES ON "db_name" FROM "measurement_name" WITH KEY = appVersion
now whenever I select :appName: = 'a', I want that :appVersion: should show only "1.1" value in dropdown. But :appVersion: shows both values "1.1" and "2.1". We know "2.1" value is useless when we have selected appName=a.
I thought I can use this for defining :appVersion:
SHOW TAG VALUES ON "db_name" FROM "measurement_name" WITH KEY = appVersion WHERE appName = :appName:
but this is not working
Please help me to achieve this kind of dynamic/codependent variables in chronograf
Upvotes: 0
Views: 194
Reputation: 78
solved this with this:
show tag values on "db_name" from "measurement_name" with key = "appVersion" where appName = ':app_name:'
I had to use single quote after where clause. Seems I cant use " here
Upvotes: 0