marking origin of logs in logstash

I send logs from my Docker containers to Logstash via netcat to tcp port.
Their format is mostly similar, so pattern-matching is not very well suitable.

Is there a way to send those logs with a tag, being a name of docker container they originate from?

  • docker current not installed - bash on ubuntu on windows 10
  • “The directory name /app/Views/ is invalid” on ASP.NET Core deployment using docker
  • How to configure exim with docker for sendmail
  • How to get the IP address of the docker host from inside a docker container
  • Rancher server not finding the rancher agent on same server
  • Running Docker pull command in Dockerfile
  • Optional container in task definition in cloudformation tempalte
  • Accessing host server from container during build Docker
  • Zero downtime/blue-green deployment of Single Page Application (SPA)
  • No public port '22/tcp' published for test_sshd
  • Docker: Why port forwarding is not working with go tour?
  • When restart service,some docker containers don't start
  • One Solution collect form web for “marking origin of logs in logstash”

    Why not use something like tiller to write out your Logstash configuration dynamically, and add a tag to the outbound log stream?

    You could then use an ENTRYPOINT statement to kick off the tiller script, write out the config, and start your Logstash forwarder.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.