logstash-filter-docker_metadata 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f6165c23f48b061c94a91cb674af551150dcca1d
4
- data.tar.gz: a2c775c6a62f597aaf528728c0eacdba9adf6104
3
+ metadata.gz: d37853fad6b429426f7b2d0501f260336824ae7a
4
+ data.tar.gz: 1a73e1cffb24ced76ea68f8861d470fdb0ec0cce
5
5
  SHA512:
6
- metadata.gz: 038d8a0ff1b75543ee1df49c1938973870ab4b8769ccf3fd81bdf742316c304ea157017124db93ef4581011a4896b8a1e07146f5ef7e0406dd0f6f15177d6cd0
7
- data.tar.gz: f4698aab2649ea343bfea8cbfe3a94bc83cc821e28a3c4506cfe555f1c95efea563ba64d983e4e436719c91e408f841b89f590e56486f8d6e6a611432a6b2c15
6
+ metadata.gz: 4f8dab41edbe9427f367a9b709ea4537aed950c21e4cb363563c90fc0a9ebf18efd7271faf116519f04f448bdda7146f3e946c52899c5aea460c6acf6b2e778c
7
+ data.tar.gz: 8f132172396fa9a5d367d5e72ca93025480875131e87df499dd81a88ba8965797bb396f06d40fc451fe392ec33c44f1d36428471faca5de3d9b7fc12dfac502a
data/dockerTest.sh CHANGED
@@ -2,6 +2,7 @@
2
2
  PWD=$(pwd)
3
3
  docker run -ti \
4
4
  -v $PWD:/tmp/logstash-filter \
5
+ -v /var/lib/docker/containers:/logs/docker \
5
6
  -v $PWD/setup.sh:/usr/local/bin/setupPlugin \
6
7
  -v /var/run/docker.sock:/var/run/docker.sock:ro \
7
8
  logstash bash
@@ -63,9 +63,9 @@ class LogStash::Filters::DockerMetadata < LogStash::Filters::Base
63
63
  public
64
64
  def filter(event)
65
65
 
66
- # get container id from source field
67
- if event["source"]
68
- container_id = event["source"].match(@container_id_regexp_compiled)
66
+ # get container id from path field
67
+ if event["path"]
68
+ container_id = event["path"].match(@container_id_regexp_compiled)
69
69
  end
70
70
 
71
71
  # if it failed fall back to message field
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-docker_metadata'
3
- s.version = '0.1.2'
3
+ s.version = '0.1.3'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "This filter add docker metadata to messages that contain a docker ID. It's heavily inspired from https://github.com/fabric8io/fluent-plugin-docker_metadata_filter."
6
6
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-filter-docker_metadata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic