Elastic 6.4.2: Query as variable in link url

Hello all,

I have a dashboard with multi queries (Elasticsearch as source), each queries is a different request to my Kibana


A) message:“ERROR”
B) hostname=test
C) message:“Down”


In visualization I added a data links to my kibana, so the user can click to switch to the Kibana/elasticsearch website and see what exactly happened when an alert occurs

Unfortunately I found no way to pass the query as variable

http://kibana.local/xxxx?QUERYxxx (where query is the value of A,B,C …)

Beyond my usage, I think this can be very useful to pass the query as request to another site

For example also for ticketing purpose, eg with Prometheus as source


When it’s necessary the operator click on his panel and generates a ticket with predefined value (time, node, etc, and also the query who generated an alert)

Thank you

IMHO pass query as a parameter is a bad idea. It allows remote query execution which implies a lot of security concerns and AFAIK Grafana does not support it.

Thank you for the answer, the execution is from browser so there is no more/less specific rights for kibana.
The link is only a kibana construction but the user can do exactly the same, It allows nothing more

About usage, the user can see the alerts, can switch to kibana with a link, but, and this is a pity, must manually writes the query (sometimes very complex) to find the previous alert

I’m very surprised nobody uses Grafana like this ?

1 Like