logstash-filter-docker_metadata 0.1.1 → 0.1.2

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: a66da1eeb97f430fd70b50c0f64e919720f4deb7
4
- data.tar.gz: b7541a2bf62f822fa9451add76409f44a84a4cf2
3
+ metadata.gz: f6165c23f48b061c94a91cb674af551150dcca1d
4
+ data.tar.gz: a2c775c6a62f597aaf528728c0eacdba9adf6104
5
5
  SHA512:
6
- metadata.gz: 18ec65c708656acbbd13a616cb575a731a773c440e6e5d2dbdadcf0138c0988b0380a246b4d545ca6772e29243c3ede67376b20113991a308a7eae9efcf4af47
7
- data.tar.gz: 06873c46f5dc1bffcb953ddd7b358f55ba4958a7437797e0c1129edd9de573c3fea505d6528b33c3f95ed12a9958e4667838394a0d77ede70d5aa8e3dec789f0
6
+ metadata.gz: 038d8a0ff1b75543ee1df49c1938973870ab4b8769ccf3fd81bdf742316c304ea157017124db93ef4581011a4896b8a1e07146f5ef7e0406dd0f6f15177d6cd0
7
+ data.tar.gz: f4698aab2649ea343bfea8cbfe3a94bc83cc821e28a3c4506cfe555f1c95efea563ba64d983e4e436719c91e408f841b89f590e56486f8d6e6a611432a6b2c15
@@ -63,15 +63,15 @@ class LogStash::Filters::DockerMetadata < LogStash::Filters::Base
63
63
  public
64
64
  def filter(event)
65
65
 
66
- # get container id from message field
67
- if event["message"]
68
- container_id = event["message"].match(@container_id_regexp_compiled)
66
+ # get container id from source field
67
+ if event["source"]
68
+ container_id = event["source"].match(@container_id_regexp_compiled)
69
69
  end
70
70
 
71
- # if it failed fall back to source field
71
+ # if it failed fall back to message field
72
72
  if !container_id || !container_id[0]
73
- if event["source"]
74
- container_id = event["source"].match(@container_id_regexp_compiled)
73
+ if event["message"]
74
+ container_id = event["message"].match(@container_id_regexp_compiled)
75
75
  end
76
76
  end
77
77
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-filter-docker_metadata'
3
- s.version = '0.1.1'
3
+ s.version = '0.1.2'
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic