Filtering problem

i have grafana v10.3.3 and I’ve created a panel with elasticsearch data source of a timeseries graph. with the following query: aggregation- count, group by-terms, by- ServerName.keyword, Top 10, Min Doc Count Order by: Doc count, and then group by- Data histogram @timestamp, inerval 10s.the data is from logs that have ip addresses data as well. so i wanted to filter by device ip, so i created a text box variable and i want that if i type an ip address in the text box it will filter the data by the ip address and if not it will not filter anything. i tried a lot of lucene queries and they did not work. what do you suggest me to do?

Hi, I did something similar like two days ago :smile:

You can use following Lucene query:

< your field >: ${< variable name >:raw}

e.g.

device.ip: ${var:raw}

and in your variable settings set Default value to *

should work

hi thanks but there’s a problem that when I type anything into the text box it becomes the default value instead of the . so that after I type something in the text box and delete it, it doesn’t give me all the options because the default value is no longer ""

Did you set default value of variable to be *

yes and it still changed after I typed something into the text box