add support for grafana global builtin-variables
lilvinz opened this issue · 2 comments
lilvinz commented
http://docs.grafana.org/reference/templating/#global-built-in-variables
Being able to use $__interval in custom queries would drasically improve query performance when changing the displayed time interval.
joente commented
Did you try to use $__interval
in a custom query? My guess is that it should work since the time format matches with the SiriDB time format. (I believe that in Grafana you can click on the "menu" button to edit the raw query)
lilvinz commented
It seems not to be resolved. The query inspector shows $__interval in the request.
Maybe resolving has to be done at the plugin layer?
Or maybe i am misunderstanding basic grafana concepts.
{
"xhrStatus": "complete",
"request": {
"method": "POST",
"url": "api/datasources/proxy/1/query",
"data": {
"query": "select\nmean($__interval)\nfrom\n`test_group`\nbetween 1543856539s and 1543856839s"
}
},
"response": {
"error": "Internal Server Error",
"response": "Query error at position 0. Expecting date/time_string, now, single_quote_str, double_quote_str, integer, ( or )\n",
"message": "Internal Server Error"
}
}