0

I am new to openshift and fluentd world.

My project is deployed on openshift and right now my project's console logs are routed to graylog with the help of fluentd( looks like a default configuration ). But, I also have a bunch of other log files sitting under a different folder structure, and I want those files to be routed to graylog as well. How do I tell fluent-d to go look for files sitting under a different a pod ? Eventually I either need to add another file path or somehow route all my log files to /var/log/containers. How can this be achieved ?

My current configuration

<source>
  @type tail
  path /var/log/containers/*.log
  pos_file /var/log/es-containers.log.pos
  time_format %Y-%m-%dT%H:%M:%S
  tag raw.kubernetes.*
  format json
  keep_time_key true
  read_from_head true
  exclude_path []
  read_lines_limit 500
</source>
Phoenix
  • 21
  • 1
  • 5

1 Answers1

0

Multiple path can be achieved like the below example:

path /path/to/a/*,/path/to/b/c.log

However if you want to fetch log from different Pods - create a shared volume for containers (emptyDir) inside Pods and then fetch the logs from the same directory.

Deb
  • 587
  • 4
  • 12