Help for new logstash filter : docker metadata

(from https://github.com/elastic/logstash/issues/3494 )

Hi,

I'm trying to adapt this fluentd filter (https://github.com/fabric8io/fluent-plugin-docker_metadata_filter) into a logstash filter.

It does not seam really hard. The plugin basically do :

  1. extract the id of the container from the path of it's logfile

  2. call the docker api to get metadata with Docker::Container.get(container_id).info

  3. put those metadata into fields

Since I don't have any Ruby background, I'm struggling to adapt the code and to test it.

Any help would be welcome.