Is it possible to classify kubernetes pod logs collected by fluentd?

4/13/2017

Currently, fluentd is used to collect logs produced by kubernetes pods, which are located under `/var/log/containers/'. The problem is that different kinds of pods may have different log formats. And I want to classify those log files so that they can be processed distinctively.

Can I add labels to kubernetes pods, such as log4j, python_log, and detected by fluentd?

-- Haoyuan Ge
fluentd
kubernetes
logging

1 Answer

4/19/2017

You can use fluent plugin kubernetes metadata filter to get the pod's metadata and classify it with other approach.

-- Crazykev
Source: StackOverflow