1

I am trying to create a dynamic variable for a graph using a kdb+ database, which requires the Simple-JSON plug in. However, I am struggling to figure out how to write the query in the Query search bar under Variables on my Dashboard.

I have looked into the documentation found here but there is only a few mentions of the templating feature for variables in grafana, but nothing on how to do it.

https://github.com/grafana/simple-json-datasource/blob/master/README.md

2 Answers2

2

You can write arbitrary text in the timeserie query, it doesn't need to be one of the hardcoded metrics that /search returns.

grafana screenshot


There is also the simpod json datasource plugin.

https://grafana.com/grafana/plugins/simpod-json-datasource

built on top of the Simple JSON Datasource. It has refactored code, additional features and active development.

One of the "additional features" is an "Additional JSON Data" tab where you can use variables. {"key": $variableValue}

Philip
  • 4,128
  • 5
  • 31
  • 49
0

It actually turns out that the adaptor for kdb+/grafana needs it's search function overloaded to be able to accept variables and return a string (or something that grafana can understand).