Loki
Last updated
Last updated
By Techno TimPosted 4 months ago Updated 12 days ago 4 min read
I’ve been on a quest to find a new logging system. I’ve use quite a few in the past, some open source, some proprietary, and some home grown, but recently I’ve decided to switch. I’ve switched to Grafana Loki for all of my logs for all of my systems - this includes machines, devices, docker systems and hosts, and my all of my kubernetes clusters. If you’re thinking of using Grafana and are also looking for a fast way to log all of your systems, join me as we discuss and configure Grafana Loki
Don’t want to host it yourself? Check out Grafana Cloud and sign up for a free account https://l.technotim.live/grafana-labs
See all the hardware I recommend at https://l.technotim.live/gear
Don’t forget to check out the 🚀Launchpad repo with all of the quick start source files.
See this post on how to install docker
and docker-compose
If you’re using Docker compose
docker-compose.yml
loki-config.yml
promtail-config.yml
Install docker plugin
Edit docker daemon config
daemon.json
Restart docker daemon.
You will also need to recreate your containers after applying this setting *
Query all logs from the varlogs
stream
Query all logs from the varlogs
stream and filter on docker
Query all logs from the container_name
label of uptime-kuma
and filter on host
of juno
Read more about LogQL here
There is a workaround for using this with ARM CPUs. Credit to AndreiTelteu for finding this in this discussion
delete /etc/docker/daemon.json
Add the vector service to the docker-compose.yml file
Run this command
paste this config in the file:
Credits to this post for the config file: grafana/loki#2361 (comment)
If you’re looking to set this up in kubernetes, see this post