Using constant template variable as general query

Update: I wanted to allow users to enter any query in dashboard and that is possible with just filters.

I want for users to be able to change constant template variable with any query and to use that query in panels. When I look in inspector whole variable is escaped, I’ll give example, for constant variable query_var value:

hostname.keyword: host-02

In query inspector I get


If I just type value in query field then query is:


So no extra escaping occurs.

Is there any way to turn off that escaping?

I would really like feature like this which would allow users to search logs from Grafana. So if there is not what should be changed to allow this?

I succeeded doing what I wanted and that is to enable users to type random query in Grafana with filters. So I don’t need to use constant templated variables at all.