![]() script 1ĭocker plugin install grafana/loki-docker-driver:latest -alias loki -grant-all-permissionsĭon’t forget to restart the docker daemon after installing the plugin. The easiest way to add the loki logging driver is with a docker plugin. To ship logs to Loki automatically for every container we add to our setup, we need to add the loki logging driver. ![]() The local-config.yaml is a default from the Loki Github page. 1Ĭommand: -config.file=/etc/loki/local-config.yaml The command part tells Loki to read the config from the local-config.yaml which is added as a volume. Setup Loki Containerįirst of all, we will need to define a Loki container in the docker-compose.yml. It really makes the developers life easier, especially after chasing log files in 20 different terminals.įrom what I have read, Loki was battle tested by Grafana, so I am sure it is capable of running in production just fine. I have been using Loki in a development setup with 24 services for three months now and had zero problems with it. ![]() In this blog post, I will show how to setup a Loki container using docker compose, how to define the Loki logging driver to automatically ship all container logs and finally, how to view the logs in Grafana. It is cost effective, easy to operate and allows viewing logs directly in Grafana. Loki is a multi-tenant log aggregation system inspired by Prometheus.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |