logstash-filter-alter 3.0.0 → 3.0.1
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 +111 -0
- data/logstash-filter-alter.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: aaf4cc75e912bedf287ba04e6755f7c557afc62b
|
4
|
+
data.tar.gz: 9311c0a27c184fdf7540ad3579e6e0919df5a4a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ecd4885422e7a4e1d1bceb9a951b22ba82ea1c01d64a827e4510392e1b115376a6823e2b5994f27c8f1ac74acd74bd9e3b69465b112ac75ba42c1c4853b8ecc
|
7
|
+
data.tar.gz: 11056e648062859ef09e5faed81fd7c8384ec415f67d8887a24e0bdea144976283947afc4a42f1b39c1774060cb832f06d84719b1fe692865add2b44f37e3661
|
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,111 @@
|
|
1
|
+
:plugin: alter
|
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
|
+
=== Alter filter plugin
|
18
|
+
|
19
|
+
include::{include_path}/plugin_header.asciidoc[]
|
20
|
+
|
21
|
+
==== Description
|
22
|
+
|
23
|
+
The alter filter allows you to do general alterations to fields
|
24
|
+
that are not included in the normal mutate filter.
|
25
|
+
|
26
|
+
|
27
|
+
NOTE: The functionality provided by this plugin is likely to
|
28
|
+
be merged into the 'mutate' filter in future versions.
|
29
|
+
|
30
|
+
[id="plugins-{type}s-{plugin}-options"]
|
31
|
+
==== Alter Filter Configuration Options
|
32
|
+
|
33
|
+
This plugin supports the following configuration options plus the <<plugins-{type}s-{plugin}-common-options>> described later.
|
34
|
+
|
35
|
+
[cols="<,<,<",options="header",]
|
36
|
+
|=======================================================================
|
37
|
+
|Setting |Input type|Required
|
38
|
+
| <<plugins-{type}s-{plugin}-coalesce>> |<<array,array>>|No
|
39
|
+
| <<plugins-{type}s-{plugin}-condrewrite>> |<<array,array>>|No
|
40
|
+
| <<plugins-{type}s-{plugin}-condrewriteother>> |<<array,array>>|No
|
41
|
+
|=======================================================================
|
42
|
+
|
43
|
+
Also see <<plugins-{type}s-{plugin}-common-options>> for a list of options supported by all
|
44
|
+
filter plugins.
|
45
|
+
|
46
|
+
|
47
|
+
|
48
|
+
[id="plugins-{type}s-{plugin}-coalesce"]
|
49
|
+
===== `coalesce`
|
50
|
+
|
51
|
+
* Value type is <<array,array>>
|
52
|
+
* There is no default value for this setting.
|
53
|
+
|
54
|
+
Sets the value of field_name to the first nonnull expression among its arguments.
|
55
|
+
|
56
|
+
Example:
|
57
|
+
[source,ruby]
|
58
|
+
filter {
|
59
|
+
alter {
|
60
|
+
coalesce => [
|
61
|
+
"field_name", "value1", "value2", "value3", ...
|
62
|
+
]
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
[id="plugins-{type}s-{plugin}-condrewrite"]
|
67
|
+
===== `condrewrite`
|
68
|
+
|
69
|
+
* Value type is <<array,array>>
|
70
|
+
* There is no default value for this setting.
|
71
|
+
|
72
|
+
Change the content of the field to the specified value
|
73
|
+
if the actual content is equal to the expected one.
|
74
|
+
|
75
|
+
Example:
|
76
|
+
[source,ruby]
|
77
|
+
filter {
|
78
|
+
alter {
|
79
|
+
condrewrite => [
|
80
|
+
"field_name", "expected_value", "new_value",
|
81
|
+
"field_name2", "expected_value2", "new_value2",
|
82
|
+
....
|
83
|
+
]
|
84
|
+
}
|
85
|
+
}
|
86
|
+
|
87
|
+
[id="plugins-{type}s-{plugin}-condrewriteother"]
|
88
|
+
===== `condrewriteother`
|
89
|
+
|
90
|
+
* Value type is <<array,array>>
|
91
|
+
* There is no default value for this setting.
|
92
|
+
|
93
|
+
Change the content of the field to the specified value
|
94
|
+
if the content of another field is equal to the expected one.
|
95
|
+
|
96
|
+
Example:
|
97
|
+
[source,ruby]
|
98
|
+
filter {
|
99
|
+
alter {
|
100
|
+
condrewriteother => [
|
101
|
+
"field_name", "expected_value", "field_name_to_change", "value",
|
102
|
+
"field_name2", "expected_value2", "field_name_to_change2", "value2",
|
103
|
+
....
|
104
|
+
]
|
105
|
+
}
|
106
|
+
}
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
[id="plugins-{type}s-{plugin}-common-options"]
|
111
|
+
include::{include_path}/{type}.asciidoc[]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-alter'
|
4
|
-
s.version = '3.0.
|
4
|
+
s.version = '3.0.1'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "The alter filter allows you to do general alterations to fields that are not included in the normal mutate filter"
|
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"
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
11
11
|
s.require_paths = ["lib"]
|
12
12
|
|
13
13
|
# Files
|
14
|
-
s.files = Dir[
|
14
|
+
s.files = Dir["lib/**/*","spec/**/*","*.gemspec","*.md","CONTRIBUTORS","Gemfile","LICENSE","NOTICE.TXT", "vendor/jar-dependencies/**/*.jar", "vendor/jar-dependencies/**/*.rb", "VERSION", "docs/**/*"]
|
15
15
|
|
16
16
|
# Tests
|
17
17
|
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-alter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
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/alter.rb
|
60
61
|
- logstash-filter-alter.gemspec
|
61
62
|
- spec/filters/alter_spec.rb
|