logstash-filter-environment 2.0.5 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/LICENSE +1 -1
- data/README.md +12 -3
- data/lib/logstash/filters/environment.rb +1 -1
- data/logstash-filter-environment.gemspec +2 -2
- data/spec/filters/environment_spec.rb +3 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69147192cf032a7d2ea89506d427914c93379ec1
|
4
|
+
data.tar.gz: e37e1a11526f46980e3b3bccdd89e756bb100540
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4090c09824fe5b3616b20e0fd601744308d92295981a2c6ab055d771a15db093603ac45dd9f7b8da09130514496af9eba2152ba8f016981cbe1d293ad80be3d
|
7
|
+
data.tar.gz: 08c647a383e208313680895b8e76e74a889f56cf456384a19bbbd1d2c550794582afaad40ae9a3f604fdc65596bc4921b17da1f0a464fca0dc705d244d0c4676
|
data/CHANGELOG.md
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
# Logstash Plugin
|
2
2
|
|
3
|
-
[](http://build-eu-00.elastic.co/view/LS%20Plugins/view/LS%20Filters/job/logstash-plugin-filter-environment-unit/)
|
3
|
+
[](https://travis-ci.org/logstash-plugins/logstash-filter-environment)
|
5
4
|
|
6
5
|
This is a plugin for [Logstash](https://github.com/elastic/logstash).
|
7
6
|
|
@@ -56,7 +55,12 @@ gem "logstash-filter-awesome", :path => "/your/local/logstash-filter-awesome"
|
|
56
55
|
```
|
57
56
|
- Install plugin
|
58
57
|
```sh
|
58
|
+
# Logstash 2.3 and higher
|
59
|
+
bin/logstash-plugin install --no-verify
|
60
|
+
|
61
|
+
# Prior to Logstash 2.3
|
59
62
|
bin/plugin install --no-verify
|
63
|
+
|
60
64
|
```
|
61
65
|
- Run Logstash with your plugin
|
62
66
|
```sh
|
@@ -74,7 +78,12 @@ gem build logstash-filter-awesome.gemspec
|
|
74
78
|
```
|
75
79
|
- Install the plugin from the Logstash home
|
76
80
|
```sh
|
77
|
-
|
81
|
+
# Logstash 2.3 and higher
|
82
|
+
bin/logstash-plugin install --no-verify
|
83
|
+
|
84
|
+
# Prior to Logstash 2.3
|
85
|
+
bin/plugin install --no-verify
|
86
|
+
|
78
87
|
```
|
79
88
|
- Start Logstash and proceed to test the plugin
|
80
89
|
|
@@ -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["@metadata
|
53
|
+
event["[@metadata][#{field}]"] = ENV[env]
|
54
54
|
end
|
55
55
|
filter_matched(event)
|
56
56
|
end # def filter
|
@@ -1,10 +1,10 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-environment'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.6'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Set fields from environment variables"
|
7
|
-
s.description = "This gem is a
|
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"
|
8
8
|
s.authors = ["Elastic"]
|
9
9
|
s.email = 'info@elastic.co'
|
10
10
|
s.homepage = "http://www.elastic.co/guide/en/logstash/current/index.html"
|
@@ -2,7 +2,9 @@ require "logstash/devutils/rspec/spec_helper"
|
|
2
2
|
require "logstash/filters/environment"
|
3
3
|
|
4
4
|
describe LogStash::Filters::Environment do
|
5
|
-
|
5
|
+
before do
|
6
|
+
ENV["MY_ENV_VAR"] = "hello world"
|
7
|
+
end
|
6
8
|
|
7
9
|
describe "add a field from the environment" do
|
8
10
|
# The logstash config goes here.
|
@@ -15,8 +17,6 @@ describe LogStash::Filters::Environment do
|
|
15
17
|
}
|
16
18
|
CONFIG
|
17
19
|
|
18
|
-
ENV["MY_ENV_VAR"] = "hello world"
|
19
|
-
|
20
20
|
sample "example" do
|
21
21
|
insist { subject["@metadata"]["newfield"] } == "hello world"
|
22
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-environment
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.6
|
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-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -38,7 +38,7 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
-
description: This gem is a
|
41
|
+
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
|
42
42
|
email: info@elastic.co
|
43
43
|
executables: []
|
44
44
|
extensions: []
|
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
75
75
|
version: '0'
|
76
76
|
requirements: []
|
77
77
|
rubyforge_project:
|
78
|
-
rubygems_version: 2.
|
78
|
+
rubygems_version: 2.6.3
|
79
79
|
signing_key:
|
80
80
|
specification_version: 4
|
81
81
|
summary: Set fields from environment variables
|