logstash-filter-metrics 2.0.1 → 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/logstash-filter-metrics.gemspec +1 -1
- data/spec/filters/metrics_spec.rb +30 -20
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c7f81b558f1512471b4d7316f7a9c0f2054d8eb
|
4
|
+
data.tar.gz: 4d1a1e29edeaf40a79e6051218e3a2567ba0cfa7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c255bdc2ed0f551a2fba209e63ad38d5b4a8d112f309d02b0142965885fd245f8e4247305926c363aa67d7ac9c975c29444ed5357fcc5fda18ef92c5e8c70a5
|
7
|
+
data.tar.gz: f985ae3ccd4088fba4d96eef0c8e283fe5ddf6f2d373aec54a9f965d5c1f4dfcab6ac8594450a74dc307937a606a3393491fff5a2d583150c528c54fe48b32cf
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
## 2.0.2
|
2
|
+
- Fix test that used deprecated "tags" syntax
|
3
|
+
|
1
4
|
## 2.0.0
|
2
5
|
- Plugins were updated to follow the new shutdown semantic, this mainly allows Logstash to instruct input plugins to terminate gracefully,
|
3
6
|
instead of using Thread.raise on the plugins' threads. Ref: https://github.com/elastic/logstash/pull/3895
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-metrics'
|
4
|
-
s.version = '2.0.
|
4
|
+
s.version = '2.0.2'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "The metrics filter is useful for aggregating metrics."
|
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/plugin install gemname. This gem is not a stand-alone program"
|
@@ -86,26 +86,36 @@ describe LogStash::Filters::Metrics do
|
|
86
86
|
|
87
87
|
context "with multiple instances" do
|
88
88
|
it "counts should be independent" do
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
89
|
+
config1 = {"meter" => ["http.%{response}"]}
|
90
|
+
config2 = {"meter" => ["http.%{response}"]}
|
91
|
+
filter1 = LogStash::Filters::Metrics.new config1
|
92
|
+
filter2 = LogStash::Filters::Metrics.new config2
|
93
|
+
events1 = [
|
94
|
+
LogStash::Event.new({"response" => 200}),
|
95
|
+
LogStash::Event.new({"response" => 404})
|
96
|
+
]
|
97
|
+
events2 = [
|
98
|
+
LogStash::Event.new({"response" => 200}),
|
99
|
+
LogStash::Event.new({"response" => 200})
|
100
|
+
]
|
101
|
+
filter1.register
|
102
|
+
filter2.register
|
103
|
+
|
104
|
+
events1.each do |event|
|
105
|
+
filter1.filter event
|
106
|
+
end
|
107
|
+
|
108
|
+
events2.each do |event|
|
109
|
+
filter2.filter event
|
110
|
+
end
|
111
|
+
|
112
|
+
events1 = filter1.flush
|
113
|
+
events2 = filter2.flush
|
114
|
+
|
115
|
+
insist { events1.first["http.200.count"] } == 1
|
116
|
+
insist { events2.first["http.200.count"] } == 2
|
117
|
+
insist { events1.first["http.404.count"] } == 1
|
118
|
+
insist { events2.first["http.404.count"] } == nil
|
109
119
|
end
|
110
120
|
end
|
111
121
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-10-
|
11
|
+
date: 2015-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|