0
votes

I have around 30 docker containers which write the logs to journald with the tag 'container_name'. I'm using google-fluentd to send the logs to the Google Stackdriver. I'm finding it difficult to categorize the logs using the tag given in journald.

In google-fluentd.conf I tried tagging logs to Stackdriver one by one like shown below.

<source>
  @type systemd
  filters [{ "_SYSTEMD_UNIT": "test.service" }]
  <storage>
    @type local
    persistent true
    path /var/run/google-fluentd/test.service.pos
  </storage>
  read_from_head true
  tag test.service
</source>

This works, but if the number of services increases, I will have to include one block at a time. Without doing this, is there an easy way to get the container logs from journald from the tag and write to Stackdriver?

1

1 Answers

1
votes