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?

  • Cannot start container: [8] System error: exec format error
  • docker compose - add python to LAMP
  • Kubernetes locally via Docker: why do we need port forwarding?
  • Grafana + InfluxDB configuration
  • How to bind Jenkins build output with tests result?
  • How to access root-folder from dockerfile which isn't in root
  • App running on docker consuming page cache of host machine.Is that anti-pattern ?
  • Failed to communicate a dockerized process with elastic search with “None of the configured nodes are available”
  • docker compose run bash command on start
  • Docker - Sharing docker files with host?
  • Command docker run create empty container
  • How to get my docker centos sshd passwordless server running?
  • 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.