/logfile-analyisis-grafana-loki

Contains a Grafana Loki stack to analyze existing log files

Apache License 2.0Apache-2.0

logfile-analyisis-grafana-loki

Contains a Promtail - Grafana Loki - Grafana stack to analyze existing log files from a local drive.

Run

  1. Set the path of the directory containing the logs you want to analyze in the .env file.

  2. docker-compose up -d

  3. Open:http://localhost:3000/ (admin:admin)

  4. Open Dashboard "All log lines".

Now you can start exploring your logs with LogQL.

Management

Promtail

Loki

Use the file api.http to test the Loki API.

How it works

  1. Promtail reads .log files.
  2. Then sends them to Loki.
  3. Loki stores the logs.
  4. Grafana queries them using LogQL.

Future work

  • 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