Elasticsearch log querying in Grafana

Hi folks!

I have running Elasticsearch with one cluster and shard where I have some test log messages that look like idNumber.suffix. Suffix can have only two values either “dn” or “mt”.

I’d like to use Grafana to visualize my data to Pie chart.

I installed Grafana 6.3.5 and connected with Elasticsearch index as data source. I can see my logs when I switch the view from Metrics to Logs at the control panel on the top. Then I have only one bar for searching through my logs and it says Enter a Lucene query but it makes just easy searches.

In particular I’d like to see every log message that has the same idNumber and both suffix (mt and dn).

Please tell me how can I write a query, create pie chart and find what I’m looking for.

Thank you very much!!