Select the Logs query type
The Elasticsearch query editor in Grafana offers three query types: Metrics, Logs, and Raw data. For exploring and analyzing log entries, the Logs query type provides an optimized view that displays individual log messages with timestamps and log levels.
In this milestone, you’ll switch to the Logs query type to begin exploring your Elasticsearch log data.
To select the Logs query type, complete the following steps:
In the Explore query editor, locate the query type selector.
Note
The default query type is Metrics, but this can be changed in your data source settings under Elasticsearch details > Default query mode.
Click the query type dropdown.
Select Logs from the available options.
Notice that the query editor interface updates to show log-specific options, including a Limit field.
(Optional) Adjust the Limit field to control how many log entries are returned.
For example, leave the default of
500or enter a different value like1000.
The query type shows Logs and the interface displays a Limit option for controlling the number of returned log entries.
In the next milestone, you’ll write a Lucene query to search for specific log entries.
At this point in your journey, you can explore the following paths:
