Skip to content

Latest commit

 

History

History
36 lines (25 loc) · 1.46 KB

README.md

File metadata and controls

36 lines (25 loc) · 1.46 KB

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"}'
  • Note that you may also configure globally docker to log using journald in /etc/docker/daemon.json :
{
    "log-driver": "journald"
}

(systemctl daemon-reload && systemctl restart docker)

Ressources