Grafana Elasticsearch metrics

Hi,

Can Grafana 4.1 use elasticsearch sub-queries in the Metrics of a Graph?

For example, I have B query which has one value and which I intent to use in the query A, in the script field. See the picture below.

It fails with this:
“caused_by”: {
“type”: “script_exception”,
“reason”: “compile error”,
“caused_by”: {
“type”: “illegal_argument_exception”,
“reason”: “unexpected character [#].”,
“caused_by”: {
“type”: “lexer_no_viable_alt_exception”,
“reason”: null
}
},
“script_stack”: [
“(_value-#B\#B)*100”,
" ^---- HERE"
],
“script”: “(_value-#B\#B)*100”,
“lang”: “painless”

Hi,

That’s not supported.

Marcus

And you think that it might be implemented in a newer release ?

It would be really helpful if you’d like to create dynamic panels and that’s what’s holding us back for the moment.

Kind regards,

Cosmin

Nothing we’ve planned in short term. You may be able to use https://github.com/GoshPosh/grafana-meta-queries to achieve what you want. I have not tried that, but heard other people being successful with it.

Marcus