Help for new logstash filter : docker metadata

(from )


I'm trying to adapt this fluentd 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.