gysel / loki-grafana

Example of Loki and Grafana in action

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Loki & Grafana

Collect logs with promtail, store them in Loki, and browse them in Grafana.

Use docker-compose up to run this example.

Grafana is running on localhost:3000 (default credentials are admin/secret, deep link directly to logs)

Documentation:

Tail files with promtail

Define file patterns to tail in config.yml
link:promtail/config/config.yml[]

Docker logging driver

To directly ship container logs to Loki, you can use the Docker logging driver.

Install Loki logging plugin
docker plugin install grafana/loki-docker-driver:latest --alias loki --grant-all-permissions
Use the Loki logging driver in a Docker container
link:docker-compose.yml[]

About

Example of Loki and Grafana in action