This stack uses Telegraf, InfluxDb, Grafana, Loki, Promtail and Traefik.
Before using this project, please ensure you have the following prerequisites :
- A host with
docker
installed, and a priviledged access to this host, docker-compose
- A
docker-compose
stack running Traefik- any usage of versions below
v2.6
may need some adjustements of thedocker-compose.yml
- any usage of versions below
- An available DNS entry pointing to your host, for exposing Grafana
$ cp .env.example .env
Edit the .env
file with your values.
Run the setup script :
$ ./setup.sh
Run the monitoring stack
$ docker-compose up -d
Adjust the docker-compose.yml
annotations for Traefik to match your mesh configuration.
In our project, we are using a docker network named dockernet
.
We have created it with the following command :
docker network create dockernet
Be sure your Traefik instance is connected to that network.
If you want to use another docker network :
- Replace all
dockernet
strings present in this repository by your docker network name.
docker-compose up -d
Just add the dashboard JSON file into the config/grafana/dashboards
then restart the monitoring stack.
Go to the Grafana Website and search dashboards with InfluxDb2
Data Source.
Check the Telegraf logs, maybe it cannot access to the docker.sock file. Adjust access rights accordingly on the docker host.
docker-compose logs -f
This monitoring stack was inspired by many projects available on Internet :
This repository is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
EOF