Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ruanbekker/docker-promtail-loki
Docker Compose Stack with Grafana Loki and Promtail
https://github.com/ruanbekker/docker-promtail-loki
docker docker-compose grafana logging loki promtail
Last synced: about 13 hours ago
JSON representation
Docker Compose Stack with Grafana Loki and Promtail
- Host: GitHub
- URL: https://github.com/ruanbekker/docker-promtail-loki
- Owner: ruanbekker
- Created: 2022-11-17T16:32:55.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-21T12:29:24.000Z (6 months ago)
- Last Synced: 2025-01-14T14:09:34.336Z (8 days ago)
- Topics: docker, docker-compose, grafana, logging, loki, promtail
- Language: Makefile
- Homepage: https://blog.ruanbekker.com/blog/2022/11/18/logging-with-docker-promtail-and-grafana-loki/
- Size: 16.6 KB
- Stars: 72
- Watchers: 3
- Forks: 35
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# docker-promtail-loki
Docker Compose Stack with Grafana Loki, Promtail and the Grafana [Explore Logs](https://grafana.com/blog/2024/04/09/find-your-logs-data-with-explore-logs-no-logql-required/) plugin.> [!NOTE]
> For a full example with prometheus, alertmanager, cadvisor, node-exporter and loki, please see the following repo:
> - https://github.com/ruanbekker/docker-monitoring-stack-gpnc## Usage
Start the stack with:
```bash
make up
```Access nginx on http://localhost:8080
## View Logs
Then navigate to grafana on http://localhost:3000 and select explore on the left and select the container:
And you will see the logs:
## Explore Logs
The grafana explore-logs app can be found under explore:
![image](https://github.com/user-attachments/assets/14aa2b93-8baf-441b-bd18-eeade5dd575c)
Any application that logs to Loki can be discovered here:
Here we can view the log content for the selected `service_name`:
This view we can explore the different labels thats available for our selected service:
For example, we can select the `level` label, which will then append that to our LogQL query and present us with this view:
We can then include `error` for example and we will see all the error logs for our selected service:
We can then also select "Open in Explore" and our query will be pre-populated for us, eg. `{service_name="tempo-ingester", level="error"} | logfmt`:
We can also explore logs by fields:
As well as patterns:
For more information about exploring logs without LogQL, view Grafana's blog post:
- [Find your logs data with Explore Logs: No LogQL required!](https://grafana.com/blog/2024/04/09/find-your-logs-data-with-explore-logs-no-logql-required/)