Contains a Promtail - Grafana Loki - Grafana stack to analyze existing log files from a local drive.
-
Set the path of the directory containing the logs you want to analyze in the .env file.
-
docker-compose up -d
-
Open:http://localhost:3000/ (admin:admin)
-
Open Dashboard "All log lines".
Now you can start exploring your logs with LogQL.
Use the file api.http to test the Loki API.
- Promtail reads .log files.
- Then sends them to Loki.
- Loki stores the logs.
- Grafana queries them using LogQL.
- Add the file name as a label to the logs.
- Add more general metrics to the dashboard:
- Log Severity Distributio
- Top errors
- Min date and max date of the logs
- Number of lines per file