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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6165c23f48b061c94a91cb674af551150dcca1d
|
4
|
+
data.tar.gz: a2c775c6a62f597aaf528728c0eacdba9adf6104
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
67
|
-
if event["
|
68
|
-
container_id = event["
|
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
|
71
|
+
# if it failed fall back to message field
|
72
72
|
if !container_id || !container_id[0]
|
73
|
-
if event["
|
74
|
-
container_id = event["
|
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.
|
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"
|