This project allow to send all Docker Logs to Grafana Loki Server.
Clone from GitHub:
git clone https://github.com/lfdominguez/docker_log_driver_loki
and then use the Makefile:
make
Download:
Create the rootfs of the plugin and copy the release and config file
mkdir -p ./plugin/rootfs
cp config.json ./plugin/
cp docker_log_driver_loki ./plugin/rootfs/
docker plugin disable -f lfdominguez/docker-log-driver-loki
docker plugin rm -f lfdominguez/docker-log-driver-loki
docker plugin create lfdominguez/docker-log-driver-loki ./plugin
docker plugin enable lfdominguez/docker-log-driver-loki
TODO
Docker support on command line set the logging driver with --log-driver
, the plugin has this options (required):
loki-host
: Loki host address.loki-port
: Loki service port.
can be setted with --log-opt
, example:
docker run --rm -it -e LOG_LEVEL=debug --log-driver lfdominguez/docker-log-driver-loki --log-opt loki-host=192.168.120.159 --log-opt loki-port=80 hello-world