Skip to content

fungusakafungus/collect_docker_logs

Repository files navigation

Collect docker logs

Forwards logs of kubernetes pods to Graylog. This script is a smaller replacement for Fluentd.

In the same way as fluentd, collect_docker_logs runs in your kubernetes cluster as a DaemonSet and tails logs produced by the default Docker json-file driver.

Logs are enriched with kubernetes metadata, like pod name, namespace etc. and sent to Graylog via UDP.

Graylog fields are set in process_log_entry function.

It uses python3 for asyncio magic and pyinotify for log tailing. It does not talk to docker API. It is not a logging layer or infrastructure solution, it is a python script.

About

Collect logs of kubernetes/docker containers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published