7.03L Explore Loki Log - MartinWong06/grafana GitHub Wiki
-
Go to the Grafana homepage and select the Explore option from the left-hand menu.
-
In the Explore interface, select the Loki data source from the drop-down menu in the top left corner.
-
Select the log stream you want to explore from the "Log streams" drop-down menu. You can select one or more streams by clicking on them while holding down the CTRL or CMD key.
-
Enter your query in the query editor. You can use the same syntax as you would in Prometheus PromQL, but with some additional Loki-specific functions.
-
Optionally, you can filter the results using the labels associated with your logs. You can add filters in the "Filters" tab below the query editor.
-
Click the "Run query" button to execute your query.
-
The results of your query will be displayed in the table below the query editor. You can further refine your query using the column filters and sorting options available.
-
You can also create a Time Series Panel or Logs Panel of your log data by selecting the "Time Series" or "Logs " tabs respectively. Here you can customize the display options for your chart, such as the time range and aggregation function.
-
Finally, you can save your query and chart as a new panel in a dashboard by clicking the "Save" button in the top right corner of the Explore interface.