View on GitHub

docker-devbox

[DEV] Docker stacks to quickly setup a dev environment and test some tools.

fluent

Container running fluent-bit to parse and send logs to OpenSearch.

Usage with docker

# journald for a given container
docker run --log-driver=journald --rm --name test_fluent -t ubuntu echo "Testing a raw log message"
docker run --log-driver=journald --rm --name test_fluent -t ubuntu echo '{"content":"Testing a JSON log message","label":"meuh"}'
docker run --log-driver=journald --rm --name test_fluent -t ubuntu echo '{"content":"Testing a JSON \r\n multiple line \r\n log message","label":"meuh"}'

# fluentd for a given container
docker run --log-driver=fluentd --rm --name test_fluent -t ubuntu echo '{"content":"Testing a JSON log message","label":"meuh"}'
{
    "log-driver": "journald"
}

(systemctl daemon-reload && systemctl restart docker)

Ressources