logstash-filter-mutate 3.5.2 → 3.5.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -1
- data/docs/index.asciidoc +19 -4
- data/lib/logstash/filters/mutate.rb +1 -2
- data/logstash-filter-mutate.gemspec +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e7bbcb6c1b884bd1f9c2653e0c42b5cf4df89861e8d73c80375e6b6ce002e7ba
|
4
|
+
data.tar.gz: f069158a723bce0e79a3ff832703d7c55c773c48b7a57b7b87466e8f980a3f84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0efa47627024ab7246ac3dbea389665b5802394cd5c5239370014ff6e60b538c2c61a5240ab5774ccebe21b2662bc8b2540fe43adf3131303a5c0b3bad84be5
|
7
|
+
data.tar.gz: c6f2c51923fe115eaa2d35b3b1b325c0d018f784fe7ed6455f600c61e937b4e3f166a2a2eadff1b126c6b73de9f88b9637621ca175d8767beee9e7a519ff1d4b
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
## 3.5.6
|
2
|
+
- [DOC] Added info on maintaining precision between Ruby float and Elasticsearch float [#158](https://github.com/logstash-plugins/logstash-filter-mutate/pull/158)
|
3
|
+
|
4
|
+
## 3.5.5
|
5
|
+
- Fix: removed code and documentation for already removed 'remove' option. [#161](https://github.com/logstash-plugins/logstash-filter-mutate/pull/161)
|
6
|
+
|
7
|
+
## 3.5.4
|
8
|
+
- [DOC] In 'replace' documentation, mention 'add' behavior [#155](https://github.com/logstash-plugins/logstash-filter-mutate/pull/155)
|
9
|
+
- [DOC] Note that each mutate must be in its own code block as noted in issue [#27](https://github.com/logstash-plugins/logstash-filter-mutate/issues/27). Doc fix [#101](https://github.com/logstash-plugins/logstash-filter-mutate/pull/101)
|
10
|
+
|
11
|
+
## 3.5.3
|
12
|
+
- [DOC] Expand description and behaviors for `rename` option [#156](https://github.com/logstash-plugins/logstash-filter-mutate/pull/156)
|
13
|
+
|
1
14
|
## 3.5.2
|
2
15
|
- Fix: ensure that when an error occurs during registration, we use the correct i18n key to propagate the error message in a useful manner [#154](https://github.com/logstash-plugins/logstash-filter-mutate/pull/154)
|
3
16
|
|
@@ -12,7 +25,7 @@ the operations are now aborted and a configurable tag is added to the event [#13
|
|
12
25
|
- Added ability to directly convert from integer and float to boolean [#127](https://github.com/logstash-plugins/logstash-filter-mutate/pull/127)
|
13
26
|
|
14
27
|
## 3.3.4
|
15
|
-
- Changed documentation to clarify execution order and to provide workaround
|
28
|
+
- [DOC] Changed documentation to clarify execution order and to provide workaround
|
16
29
|
[#128](https://github.com/logstash-plugins/logstash-filter-mutate/pull/128)
|
17
30
|
|
18
31
|
## 3.3.3
|
data/docs/index.asciidoc
CHANGED
@@ -21,7 +21,7 @@ include::{include_path}/plugin_header.asciidoc[]
|
|
21
21
|
==== Description
|
22
22
|
|
23
23
|
The mutate filter allows you to perform general mutations on fields. You
|
24
|
-
can rename,
|
24
|
+
can rename, replace, and modify fields in your events.
|
25
25
|
|
26
26
|
[id="plugins-{type}s-{plugin}-proc_order"]
|
27
27
|
===== Processing order
|
@@ -38,13 +38,12 @@ Mutations in a config file are executed in this order:
|
|
38
38
|
* capitalize
|
39
39
|
* lowercase
|
40
40
|
* strip
|
41
|
-
* remove
|
42
41
|
* split
|
43
42
|
* join
|
44
43
|
* merge
|
45
44
|
* copy
|
46
45
|
|
47
|
-
|
46
|
+
IMPORTANT: Each mutation must be in its own code block if the sequence of operations needs to be preserved.
|
48
47
|
|
49
48
|
Example:
|
50
49
|
[source,ruby]
|
@@ -101,6 +100,14 @@ Convert a field's value to a different type, like turning a string to an
|
|
101
100
|
integer. If the field value is an array, all members will be converted.
|
102
101
|
If the field is a hash no action will be taken.
|
103
102
|
|
103
|
+
.Conversion insights
|
104
|
+
[NOTE]
|
105
|
+
================================================================================
|
106
|
+
The values are converted using Ruby semantics.
|
107
|
+
Be aware that using `float` and `float_eu` converts the value to a double-precision 64-bit IEEE 754 floating point decimal number.
|
108
|
+
In order to maintain precision due to the conversion, you should use a `double` in the Elasticsearch mappings.
|
109
|
+
================================================================================
|
110
|
+
|
104
111
|
Valid conversion targets, and their expected behaviour with different inputs are:
|
105
112
|
|
106
113
|
* `integer`:
|
@@ -265,6 +272,13 @@ Example:
|
|
265
272
|
|
266
273
|
Rename one or more fields.
|
267
274
|
|
275
|
+
If the destination field already exists, its value is replaced.
|
276
|
+
|
277
|
+
If one of the source fields doesn't exist, no action is performed for that field.
|
278
|
+
(This is not considered an error; the `tag_on_failure` tag is not applied.)
|
279
|
+
|
280
|
+
When renaming multiple fields, the order of operations is not guaranteed.
|
281
|
+
|
268
282
|
Example:
|
269
283
|
[source,ruby]
|
270
284
|
filter {
|
@@ -280,7 +294,8 @@ Example:
|
|
280
294
|
* Value type is <<hash,hash>>
|
281
295
|
* There is no default value for this setting.
|
282
296
|
|
283
|
-
Replace the value of a field with a new value
|
297
|
+
Replace the value of a field with a new value, or add the field if it
|
298
|
+
doesn't already exist. The new value can include `%{foo}` strings
|
284
299
|
to help you build a new value from other parts of the event.
|
285
300
|
|
286
301
|
Example:
|
@@ -3,7 +3,7 @@ require "logstash/filters/base"
|
|
3
3
|
require "logstash/namespace"
|
4
4
|
|
5
5
|
# The mutate filter allows you to perform general mutations on fields. You
|
6
|
-
# can rename,
|
6
|
+
# can rename, replace, and modify fields in your events.
|
7
7
|
class LogStash::Filters::Mutate < LogStash::Filters::Base
|
8
8
|
config_name "mutate"
|
9
9
|
|
@@ -258,7 +258,6 @@ class LogStash::Filters::Mutate < LogStash::Filters::Base
|
|
258
258
|
capitalize(event) if @capitalize
|
259
259
|
lowercase(event) if @lowercase
|
260
260
|
strip(event) if @strip
|
261
|
-
remove(event) if @remove
|
262
261
|
split(event) if @split
|
263
262
|
join(event) if @join
|
264
263
|
merge(event) if @merge
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-mutate'
|
4
|
-
s.version = '3.5.
|
4
|
+
s.version = '3.5.6'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Performs mutations on fields"
|
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-mutate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.5.
|
4
|
+
version: 3.5.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|
@@ -126,8 +126,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
126
|
- !ruby/object:Gem::Version
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
|
-
|
130
|
-
rubygems_version: 2.6.13
|
129
|
+
rubygems_version: 3.1.6
|
131
130
|
signing_key:
|
132
131
|
specification_version: 4
|
133
132
|
summary: Performs mutations on fields
|