logstash-filter-range 3.0.0-java → 3.0.1-java
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/Gemfile +10 -1
- data/docs/index.asciidoc +89 -0
- data/logstash-filter-range.gemspec +2 -2
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 696f4bf8fabefa6adfb842dcccdf06b43089a8b8
|
4
|
+
data.tar.gz: e6276bee77a05999afcb44008f84c5a405d15e2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0690d99887fa8bee089a996de3779e5f42b1e1ea92d9f63d8556c0d3d76fa04d59beb77ebf48e5b9e610b3e1d789ad5090e832ca9b03912dc6bf37f7bdb64c94
|
7
|
+
data.tar.gz: 3f9130ed0c1bfab14d68f233ff962d20b4ab99f54de57320a4990941160cd287fbec48bb67664d6cc257d36479674c57d22adbabd25be2dcf168982b15669d6b
|
data/Gemfile
CHANGED
@@ -1,2 +1,11 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
|
-
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
logstash_path = ENV["LOGSTASH_PATH"] || "../../logstash"
|
6
|
+
use_logstash_source = ENV["LOGSTASH_SOURCE"] && ENV["LOGSTASH_SOURCE"].to_s == "1"
|
7
|
+
|
8
|
+
if Dir.exist?(logstash_path) && use_logstash_source
|
9
|
+
gem 'logstash-core', :path => "#{logstash_path}/logstash-core"
|
10
|
+
gem 'logstash-core-plugin-api', :path => "#{logstash_path}/logstash-core-plugin-api"
|
11
|
+
end
|
data/docs/index.asciidoc
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
:plugin: range
|
2
|
+
:type: filter
|
3
|
+
|
4
|
+
///////////////////////////////////////////
|
5
|
+
START - GENERATED VARIABLES, DO NOT EDIT!
|
6
|
+
///////////////////////////////////////////
|
7
|
+
:version: %VERSION%
|
8
|
+
:release_date: %RELEASE_DATE%
|
9
|
+
:changelog_url: %CHANGELOG_URL%
|
10
|
+
:include_path: ../../../../logstash/docs/include
|
11
|
+
///////////////////////////////////////////
|
12
|
+
END - GENERATED VARIABLES, DO NOT EDIT!
|
13
|
+
///////////////////////////////////////////
|
14
|
+
|
15
|
+
[id="plugins-{type}-{plugin}"]
|
16
|
+
|
17
|
+
=== Range filter plugin
|
18
|
+
|
19
|
+
include::{include_path}/plugin_header.asciidoc[]
|
20
|
+
|
21
|
+
==== Description
|
22
|
+
|
23
|
+
This filter is used to check that certain fields are within expected size/length ranges.
|
24
|
+
Supported types are numbers and strings.
|
25
|
+
Numbers are checked to be within numeric value range.
|
26
|
+
Strings are checked to be within string length range.
|
27
|
+
More than one range can be specified for same fieldname, actions will be applied incrementally.
|
28
|
+
When field value is within a specified range an action will be taken.
|
29
|
+
Supported actions are drop event, add tag, or add field with specified value.
|
30
|
+
|
31
|
+
Example use cases are for histogram-like tagging of events
|
32
|
+
or for finding anomaly values in fields or too big events that should be dropped.
|
33
|
+
|
34
|
+
[id="plugins-{type}s-{plugin}-options"]
|
35
|
+
==== Range Filter Configuration Options
|
36
|
+
|
37
|
+
This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
|
38
|
+
|
39
|
+
[cols="<,<,<",options="header",]
|
40
|
+
|=======================================================================
|
41
|
+
|Setting |Input type|Required
|
42
|
+
| <<plugins-{type}s-{plugin}-negate>> |<<boolean,boolean>>|No
|
43
|
+
| <<plugins-{type}s-{plugin}-ranges>> |<<array,array>>|No
|
44
|
+
|=======================================================================
|
45
|
+
|
46
|
+
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
47
|
+
filter plugins.
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
[id="plugins-{type}s-{plugin}-negate"]
|
52
|
+
===== `negate`
|
53
|
+
|
54
|
+
* Value type is <<boolean,boolean>>
|
55
|
+
* Default value is `false`
|
56
|
+
|
57
|
+
Negate the range match logic, events should be outsize of the specified range to match.
|
58
|
+
|
59
|
+
[id="plugins-{type}s-{plugin}-ranges"]
|
60
|
+
===== `ranges`
|
61
|
+
|
62
|
+
* Value type is <<array,array>>
|
63
|
+
* Default value is `[]`
|
64
|
+
|
65
|
+
An array of field, min, max, action tuples.
|
66
|
+
Example:
|
67
|
+
[source,ruby]
|
68
|
+
filter {
|
69
|
+
range {
|
70
|
+
ranges => [ "message", 0, 10, "tag:short",
|
71
|
+
"message", 11, 100, "tag:medium",
|
72
|
+
"message", 101, 1000, "tag:long",
|
73
|
+
"message", 1001, 1e1000, "drop",
|
74
|
+
"duration", 0, 100, "field:latency:fast",
|
75
|
+
"duration", 101, 200, "field:latency:normal",
|
76
|
+
"duration", 201, 1000, "field:latency:slow",
|
77
|
+
"duration", 1001, 1e1000, "field:latency:outlier",
|
78
|
+
"requests", 0, 10, "tag:too_few_%{host}_requests" ]
|
79
|
+
}
|
80
|
+
}
|
81
|
+
|
82
|
+
Supported actions are drop tag or field with specified value.
|
83
|
+
Added tag names and field names and field values can have `%{dynamic}` values.
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
[id="plugins-{type}s-{plugin}-common-options"]
|
89
|
+
include::{include_path}/{type}.asciidoc[]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-range'
|
4
|
-
s.version = '3.0.
|
4
|
+
s.version = '3.0.1'
|
5
5
|
s.platform = 'java'
|
6
6
|
s.licenses = ['Apache License (2.0)']
|
7
7
|
s.summary = "This filter is used to check that certain fields are within expected size/length ranges."
|
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
|
14
14
|
# Files
|
15
|
-
s.files = Dir[
|
15
|
+
s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
|
16
16
|
|
17
17
|
# Tests
|
18
18
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logstash-filter-range
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -56,6 +56,7 @@ files:
|
|
56
56
|
- LICENSE
|
57
57
|
- NOTICE.TXT
|
58
58
|
- README.md
|
59
|
+
- docs/index.asciidoc
|
59
60
|
- lib/logstash/filters/range.rb
|
60
61
|
- logstash-filter-range.gemspec
|
61
62
|
- spec/filters/range_spec.rb
|