logstash-filter-metrics 4.0.3 → 4.0.4
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/docs/index.asciidoc +6 -6
- data/lib/logstash/filters/metrics.rb +3 -1
- data/logstash-filter-metrics.gemspec +1 -1
- data/spec/filters/metrics_spec.rb +5 -0
- 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: d4fc93f8263cbaaf90ed6ab1ab2551a6c52c5a2e
|
4
|
+
data.tar.gz: f036d56d5e2cdcda610b22a391064f02672d2317
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82a72cdb24ab5d9ce5fa02e00012069c60f83aa0c67a6d3e8e1d96495c34a2af170eb2329741d7485d8171492b587f68779a9768fc9907acf1a6fa75ccf396f4
|
7
|
+
data.tar.gz: 441b646d361ae985950cc51d566b49b7b78cf9f836206d6bf099c559c839c2e3979393a676f59a6be15b7482ab8aa25edb8f752c5037f7ed6bf6914a57eedbee
|
data/CHANGELOG.md
CHANGED
data/docs/index.asciidoc
CHANGED
@@ -12,7 +12,7 @@ START - GENERATED VARIABLES, DO NOT EDIT!
|
|
12
12
|
END - GENERATED VARIABLES, DO NOT EDIT!
|
13
13
|
///////////////////////////////////////////
|
14
14
|
|
15
|
-
[id="plugins-{type}-{plugin}"]
|
15
|
+
[id="plugins-{type}s-{plugin}"]
|
16
16
|
|
17
17
|
=== Metrics filter plugin
|
18
18
|
|
@@ -60,12 +60,12 @@ For a `meter => "something"` you will receive the following fields:
|
|
60
60
|
|
61
61
|
==== `timer` values
|
62
62
|
|
63
|
-
For a `timer =>
|
63
|
+
For a `timer => { "thing" => "%{duration}" }` you will receive the following fields:
|
64
64
|
|
65
65
|
* "[thing][count]" - the total count of events
|
66
|
-
* "[thing][rate_1m]" - the per-second
|
67
|
-
* "[thing][rate_5m]" - the per-second
|
68
|
-
* "[thing][rate_15m]" - the per-second
|
66
|
+
* "[thing][rate_1m]" - the per-second average value in a 1-minute sliding window
|
67
|
+
* "[thing][rate_5m]" - the per-second average value in a 5-minute sliding window
|
68
|
+
* "[thing][rate_15m]" - the per-second average value in a 15-minute sliding window
|
69
69
|
* "[thing][min]" - the minimum value seen for this metric
|
70
70
|
* "[thing][max]" - the maximum value seen for this metric
|
71
71
|
* "[thing][stddev]" - the standard deviation for this metric
|
@@ -225,4 +225,4 @@ syntax: `timer => [ "name of metric", "%{time_value}" ]`
|
|
225
225
|
|
226
226
|
|
227
227
|
[id="plugins-{type}s-{plugin}-common-options"]
|
228
|
-
include::{include_path}/{type}.asciidoc[]
|
228
|
+
include::{include_path}/{type}.asciidoc[]
|
@@ -158,6 +158,8 @@ class LogStash::Filters::Metrics < LogStash::Filters::Base
|
|
158
158
|
@last_flush = Atomic.new(0) # how many seconds ago the metrics where flushed.
|
159
159
|
@last_clear = Atomic.new(0) # how many seconds ago the metrics where cleared.
|
160
160
|
@random_key_preffix = SecureRandom.hex
|
161
|
+
# Same as logstash-input-file
|
162
|
+
@host = Socket.gethostname.force_encoding(Encoding::UTF_8)
|
161
163
|
unless (@rates - [1, 5, 15]).empty?
|
162
164
|
raise LogStash::ConfigurationError, "Invalid rates configuration. possible rates are 1, 5, 15. Rates: #{rates}."
|
163
165
|
end
|
@@ -193,7 +195,7 @@ class LogStash::Filters::Metrics < LogStash::Filters::Base
|
|
193
195
|
return unless should_flush?
|
194
196
|
|
195
197
|
event = LogStash::Event.new
|
196
|
-
event.set("message",
|
198
|
+
event.set("message", @host)
|
197
199
|
@metric_meters.each_pair do |name, metric|
|
198
200
|
flush_rates event, name, metric
|
199
201
|
metric.clear if should_clear?
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-metrics'
|
4
|
-
s.version = '4.0.
|
4
|
+
s.version = '4.0.4'
|
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/logstash-plugin install gemname. This gem is not a stand-alone program"
|
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: 4.0.
|
4
|
+
version: 4.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|