%%
date:: [[2024-04-24]], [[2024-10-04]]
parent::
%%
# [[How to enable Explore Logs for Loki]]
![[How to enable Explore Logs for Loki.svg]]
*The panels from the Explore Logs app* [^repo]
[repo](https://github.com/grafana/explore-logs)
[[Logs Drilldown]] is a UI on [[Grafana]] for visualizing and analyzing logs from [[Grafana Loki|Loki]] without having to use [[LogQL]]. It's an [[Open source]] feature, and is also available on [[Grafana Cloud]]. It was announced as part of [[Loki 3.0]] in [[GrafanaCON 2024]] and became GA (generally available) in [[ObservabilityCON 2024]].
## Enabling Explore Logs on Docker
<iframe width="560" height="315" src="https://www.youtube.com/embed/jx1DATkGIz4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
You can use Explore Logs with Grafana and Loki anywhere, but here's what you need to do to get it working when running [[Grafana]] and [[Grafana Loki|Loki]] within [[Docker]] using [[Docker Compose]].
> [!tip] Sample repo
> To see a simple app instrumented with [[Grafana Alloy]], sending logs to [[Grafana Loki|Loki]], and using [[Grafana]] for visualization with Explore Logs, check out [the Carnivorous Green House repo](https://github.com/grafana/loki-fundamentals/tree/what-is-loki).
### Modify the Loki config file
In the Loki [[YAML]] file, make sure the pattern ingester is enabled by adding these lines:
```yaml
pattern_ingester:
enabled: true
```
This allows the logs to be analyzed for patterns.
Then, modify the `limits_config` block or add these lines:
```yaml
limits_config:
allow_structured_metadata: true
volume_enabled: true
```
> [!tip] Optional settings
> Only `volume_enabled` is strictly required for Explore Logs; `pattern_ingester` and `allow_structured_metadata` are optional but recommended.
You can [view a sample Loki config here](https://github.com/grafana/loki-fundamentals/blob/what-is-loki/loki-config.yaml).
### Modify the Docker Compose config
Then, you'll need to modify the Grafana and Loki sections of the Docker Compose config.
You can view a sample `docker-compose.yaml` [here](https://github.com/grafana/loki-fundamentals/blob/what-is-loki/docker-compose.yml).
#### Change the Loki image version
Explore Logs requires Loki v3.2 and later.
```yaml
loki:
image: grafana/loki:main
```
#### Change the Grafana version
Explore Logs requires Grafana v11.2 and later.
```yaml
grafana:
image: grafana/grafana:latest
```
### Add the Explore Logs plugin
Explore Logs is a Grafana plugin that you'll need to enable. Use: `GF_INSTALL_PLUGINS=https://storage.googleapis.com/integration-artifacts/grafana-lokiexplore-app/grafana-lokiexplore-app-latest.zip;grafana-lokiexplore-app` in your config like so:
```yaml
grafana:
image: grafana/grafana:latest
environment:
- GF_AUTH_ANONYMOUS_ORG_ROLE=Admin
- GF_AUTH_ANONYMOUS_ENABLED=true
- GF_AUTH_BASIC_ENABLED=false
- GF_FEATURE_TOGGLES_ENABLE=accessControlOnCall
- GF_INSTALL_PLUGINS=https://storage.googleapis.com/integration-artifacts/grafana-lokiexplore-app/grafana-lokiexplore-app-latest.zip;grafana-lokiexplore-app
```
<iframe width="560" height="315" src="https://www.youtube.com/embed/eXwE2vqLcyY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
%%
# Excalidraw Data
## Text Elements
## Embedded files
5bf2d1887fe1d16cb165d07f299776bcbacd50f8: [[grafana-loki-explore-logs.png]]
## Drawing
```json
{
"type": "excalidraw",
"version": 2,
"source": "https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/2.1.6",
"elements": [
{
"id": "6EjWFYJFeCHjCq4MzQ0ft",
"type": "image",
"x": -445.82557943989246,
"y": -344.85323333740234,
"width": 1011.1764705882352,
"height": 573,
"angle": 0,
"strokeColor": "transparent",
"backgroundColor": "transparent",
"fillStyle": "solid",
"strokeWidth": 2,
"strokeStyle": "solid",
"roughness": 1,
"opacity": 100,
"groupIds": [],
"frameId": null,
"roundness": null,
"seed": 1493999584,
"version": 4,
"versionNonce": 138292192,
"isDeleted": false,
"boundElements": null,
"updated": 1713991532908,
"link": null,
"locked": false,
"status": "pending",
"fileId": "5bf2d1887fe1d16cb165d07f299776bcbacd50f8",
"scale": [
1,
1
]
}
],
"appState": {
"theme": "dark",
"viewBackgroundColor": "#ffffff",
"currentItemStrokeColor": "#1e1e1e",
"currentItemBackgroundColor": "transparent",
"currentItemFillStyle": "solid",
"currentItemStrokeWidth": 2,
"currentItemStrokeStyle": "solid",
"currentItemRoughness": 1,
"currentItemOpacity": 100,
"currentItemFontFamily": 4,
"currentItemFontSize": 20,
"currentItemTextAlign": "left",
"currentItemStartArrowhead": null,
"currentItemEndArrowhead": "arrow",
"scrollX": 583.2388916015625,
"scrollY": 573.6323852539062,
"zoom": {
"value": 1
},
"currentItemRoundness": "round",
"gridSize": null,
"gridColor": {
"Bold": "#C9C9C9FF",
"Regular": "#EDEDEDFF"
},
"currentStrokeOptions": null,
"previousGridSize": null,
"frameRendering": {
"enabled": true,
"clip": true,
"name": true,
"outline": true
},
"objectsSnapModeEnabled": false
},
"files": {}
}
```
%%
[^repo]: Grafana Labs (2024). *Explore Logs*. Retrieved from GitHub: https://github.com/grafana/explore-logs