Replies: 1 comment
-
I'm trying to achieve similar with Infinity and an API query that returns an XML. Then taking two fields from the XML and making them the Key-Val components of a variable. Absolutely stumped right now though. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
Grafana version: 10.0.1
Infinity datasource plugin version: 2.5.0
I'm struggling to find the answers to my requirements. I would like to use the Infinity datasource plugin to take CSV data to generate the equivalent of a Grafana Custom variable with 'key: value' pairs.
For example, this is the Custom Variable, say called
custom_variable
text that is used to generate the custom variable drop-down listapples : 101, oranges : 234, pears : 325
This will create a drop-down list with the following items:
(unfortunately, the values doesn't get shown, but you can still reference them).
And in the Grafana dashboard query I can reference the selected item key name with
${custom_variable}
(or$custom_variable:text
) and the value with${custom_variable:value}
So with the following CSV data:
How can I use the Infinity datasource plugin to create a Grafana variable (of type Query) (called
custom_variable
) to generate the equivalent of the Custom Variable output:apples : 101, oranges : 234, pears : 325
and also be able to reference it with
${custom_variable}
(or$custom_variable:text
) and the value with${custom_variable:value}
Thank you in advance for any help.
Beta Was this translation helpful? Give feedback.
All reactions