splitting docker stdout and stderr with fluentd fluent-plugin-rewrite-tag-filter plugin

I currently have the following config:

<match docker.nginx>
  @type rewrite_tag_filter
  rewriterule1 source stdout docker.nginx.stdout
  rewriterule2 source stderr docker.nginx.stderr
</match>

but this means, that with each container I have to do the same.

  • Docker container connect to host DocumentDB emulator
  • Docker swarm certificates
  • How to tag Docker images with a Git tag in Jenkins?
  • Minimize docker container size built with nix
  • Cannot dump a database in a mysql container
  • docker-machine create node without tls verification
  • This isn’t working, but probably you’ll get what I want from it:

    <match docker.*>
      @type rewrite_tag_filter
      rewriterule1 source stdout docker.*.stdout
      rewriterule2 source stdout docker.*.stderr
    </match>
    

    So my question is can I somehow refer to the matched tag in the match block? So if it’s nginx/rabbitmq/zookeeper/anything, it will split all event flows into docker.<fluentd-tag>.stdout and stderr.

    Thanks in advance!

  • Docker Container from php:5.6-apache as root
  • Acceptance testing, docker and selenium
  • Cannot start some containers after restarting docker daemon
  • Python invoke Docker build command line only one layer is built
  • How to specify docker image's DNS?
  • Is there a cache in ansible git module?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.