How to get GELF-Logs from local Docker daemon to Loki? How to get GELF-Logs from local Docker daemon to Loki? docker docker

How to get GELF-Logs from local Docker daemon to Loki?


If you have already sent the logs in JSON format to Loki, all you need to do is to select the desired log stream and pipe it to the "json" parser, like in the following example:

{filename="/var/log/nginx/access.log"} | json

Then, you can use the labels as you wish, like this:

{filename="/var/log/nginx/access.log"} | json | remote_addr="147.741.001.047"