logstash-filter-environment 2.0.6 → 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -4
- data/lib/logstash/filters/environment.rb +4 -4
- data/logstash-filter-environment.gemspec +2 -2
- data/spec/filters/environment_spec.rb +1 -1
- metadata +13 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4fb95a543d05d09be531ed514dc660132ec645dd
|
4
|
+
data.tar.gz: a13bef8b92f06451003a72bd50403bc0cf5c3e6d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa18f8655cced361fc3a969a0729770e61035b198c871cf4c1b48e08318c031e84e2214e476989687e2eef02b0a80a346d5eac800a68fd58eea9adb487cc0037
|
7
|
+
data.tar.gz: 2bbcc8826fe2326a381f4ca015086b87a293aad1816530ee066a387d63614558edc7405d0938f1f9cf54d07cb5707017b19713c31b759ce16c4863dbed83a214
|
data/CHANGELOG.md
CHANGED
@@ -1,16 +1,23 @@
|
|
1
|
-
|
1
|
+
## 3.0.0
|
2
|
+
- Make it work with plugin api 2.0
|
3
|
+
|
4
|
+
## 2.0.6
|
2
5
|
- Cannot do in place modification with the new Java Event
|
3
|
-
|
6
|
+
|
7
|
+
## 2.0.5
|
4
8
|
- Depend on logstash-core-plugin-api instead of logstash-core, removing the need to mass update plugins on major releases of logstash
|
5
|
-
|
9
|
+
|
10
|
+
## 2.0.4
|
6
11
|
- New dependency requirements for logstash-core for the 5.0 release
|
12
|
+
|
7
13
|
## 2.0.2
|
8
14
|
- Filtering using `tags` or `type` option is now deprecated, please use conditionals Ref: https://github.com/elastic/logstash/pull/4011
|
15
|
+
|
9
16
|
## 2.0.0
|
10
17
|
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
|
11
18
|
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
|
12
19
|
- Dependency on logstash-core update to 2.0
|
13
20
|
|
14
|
-
1.0.0
|
21
|
+
## 1.0.0
|
15
22
|
- Use @metadata instead of root-level fields
|
16
23
|
- This is a breaking change. Users will need to switch to use @metadata subfields in their configurations.
|
@@ -9,7 +9,7 @@ require "logstash/namespace"
|
|
9
9
|
# Adding environment variables is as easy as:
|
10
10
|
# filter {
|
11
11
|
# environment {
|
12
|
-
# add_metadata_from_env { "field_name" => "ENV_VAR_NAME" }
|
12
|
+
# add_metadata_from_env => { "field_name" => "ENV_VAR_NAME" }
|
13
13
|
# }
|
14
14
|
# }
|
15
15
|
#
|
@@ -30,11 +30,11 @@ class LogStash::Filters::Environment < LogStash::Filters::Base
|
|
30
30
|
# Specify a hash of field names and the environment variable name with the
|
31
31
|
# value you want imported into Logstash. For example:
|
32
32
|
#
|
33
|
-
# add_metadata_from_env { "field_name" => "ENV_VAR_NAME" }
|
33
|
+
# add_metadata_from_env => { "field_name" => "ENV_VAR_NAME" }
|
34
34
|
#
|
35
35
|
# or
|
36
36
|
#
|
37
|
-
# add_metadata_from_env {
|
37
|
+
# add_metadata_from_env => {
|
38
38
|
# "field1" => "ENV1"
|
39
39
|
# "field2" => "ENV2"
|
40
40
|
# # "field_n" => "ENV_n"
|
@@ -50,7 +50,7 @@ class LogStash::Filters::Environment < LogStash::Filters::Base
|
|
50
50
|
def filter(event)
|
51
51
|
|
52
52
|
@add_metadata_from_env.each do |field, env|
|
53
|
-
event
|
53
|
+
event.set("[@metadata][#{field}]", ENV[env])
|
54
54
|
end
|
55
55
|
filter_matched(event)
|
56
56
|
end # def filter
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-environment'
|
4
|
-
s.version = '
|
4
|
+
s.version = '3.0.0'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Set fields from environment variables"
|
7
7
|
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
|
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.metadata = { "logstash_plugin" => "true", "logstash_group" => "filter" }
|
21
21
|
|
22
22
|
# Gem dependencies
|
23
|
-
s.add_runtime_dependency "logstash-core-plugin-api", "
|
23
|
+
s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
|
24
24
|
|
25
25
|
s.add_development_dependency 'logstash-devutils'
|
26
26
|
end
|
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-environment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
15
15
|
requirements:
|
16
|
-
- - "
|
16
|
+
- - ">="
|
17
|
+
- !ruby/object:Gem::Version
|
18
|
+
version: '1.60'
|
19
|
+
- - "<="
|
17
20
|
- !ruby/object:Gem::Version
|
18
|
-
version: '
|
21
|
+
version: '2.99'
|
19
22
|
name: logstash-core-plugin-api
|
20
23
|
prerelease: false
|
21
24
|
type: :runtime
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.60'
|
30
|
+
- - "<="
|
25
31
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
32
|
+
version: '2.99'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
requirement: !ruby/object:Gem::Requirement
|
29
35
|
requirements:
|
@@ -75,7 +81,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
81
|
version: '0'
|
76
82
|
requirements: []
|
77
83
|
rubyforge_project:
|
78
|
-
rubygems_version: 2.
|
84
|
+
rubygems_version: 2.4.8
|
79
85
|
signing_key:
|
80
86
|
specification_version: 4
|
81
87
|
summary: Set fields from environment variables
|