logstash-filter-translate 3.2.0 → 3.2.1
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 +14 -3
- data/logstash-filter-translate.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3aeb6a39303875fd42818f67f71e013fdbf91641e6c35faa00d3486fab32a1a1
|
4
|
+
data.tar.gz: 8c489742a311eade2b619b4f48498e5b40286795924f043970419e3e817a59df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 73d520fa9b4a6e17586e6395d417cb87ad0d779c0886a33af3b653a8478280dc006c085d30bdb5181f92d59c7457def56e9748256464844de69cab14900cf218
|
7
|
+
data.tar.gz: 0b1548e4c43bd059ef09439792b782a900e35ed4c4c13cef3afa18c4cf763ae8304bf22d5fb877e2af751e007a1daeb534520aa4a9e0e4bc08d7e8e0693df3da
|
data/CHANGELOG.md
CHANGED
data/docs/index.asciidoc
CHANGED
@@ -37,8 +37,8 @@ the `destination` field, but on no match the `fallback` setting string is
|
|
37
37
|
used instead.
|
38
38
|
|
39
39
|
Example:
|
40
|
-
```
|
41
40
|
[source,ruby]
|
41
|
+
----
|
42
42
|
filter {
|
43
43
|
translate {
|
44
44
|
field => "[http_status]"
|
@@ -52,7 +52,7 @@ Example:
|
|
52
52
|
fallback => "I'm a teapot"
|
53
53
|
}
|
54
54
|
}
|
55
|
-
|
55
|
+
----
|
56
56
|
|
57
57
|
Occasionally, people find that they have a field with a variable sized array of
|
58
58
|
values or objects that need some enrichment. The `iterate_on` setting helps in
|
@@ -125,6 +125,7 @@ configuration item (i.e. do not use the `@dictionary_path` file).
|
|
125
125
|
|
126
126
|
Example:
|
127
127
|
[source,ruby]
|
128
|
+
----
|
128
129
|
filter {
|
129
130
|
translate {
|
130
131
|
dictionary => {
|
@@ -135,6 +136,7 @@ Example:
|
|
135
136
|
}
|
136
137
|
}
|
137
138
|
}
|
139
|
+
----
|
138
140
|
|
139
141
|
NOTE: It is an error to specify both `dictionary` and `dictionary_path`.
|
140
142
|
|
@@ -147,13 +149,16 @@ NOTE: It is an error to specify both `dictionary` and `dictionary_path`.
|
|
147
149
|
The full path of the external dictionary file. The format of the table
|
148
150
|
should be a standard YAML, JSON, or CSV. Make sure you specify any integer-based keys
|
149
151
|
in quotes. For example, the YAML file should look something like this:
|
152
|
+
|
150
153
|
[source,ruby]
|
154
|
+
----
|
151
155
|
"100": Continue
|
152
156
|
"101": Switching Protocols
|
153
157
|
merci: gracias
|
154
158
|
old version: new version
|
159
|
+
----
|
155
160
|
|
156
|
-
NOTE:
|
161
|
+
NOTE: It is an error to specify both `dictionary` and `dictionary_path`.
|
157
162
|
|
158
163
|
The currently supported formats are YAML, JSON, and CSV. Format selection is
|
159
164
|
based on the file extension: `json` for JSON, `yaml` or `yml` for YAML, and
|
@@ -173,7 +178,9 @@ destination field's data, with the translated value substituted in-place.
|
|
173
178
|
|
174
179
|
For example, consider this simple translation.yml, configured to check the `data` field:
|
175
180
|
[source,ruby]
|
181
|
+
----
|
176
182
|
foo: bar
|
183
|
+
----
|
177
184
|
|
178
185
|
If logstash receives an event with the `data` field set to `foo`, and `exact => true`,
|
179
186
|
the destination field will be populated with the string `bar`.
|
@@ -195,7 +202,9 @@ translation string, which will always populate `field`, if the match failed.
|
|
195
202
|
|
196
203
|
For example, if we have configured `fallback => "no match"`, using this dictionary:
|
197
204
|
[source,ruby]
|
205
|
+
----
|
198
206
|
foo: bar
|
207
|
+
----
|
199
208
|
|
200
209
|
Then, if logstash received an event with the field `foo` set to `bar`, the destination
|
201
210
|
field would be set to `bar`. However, if logstash received an event with `foo` set to `nope`,
|
@@ -235,10 +244,12 @@ to with `destination`.
|
|
235
244
|
|
236
245
|
For a dictionary of:
|
237
246
|
[source,csv]
|
247
|
+
----
|
238
248
|
100,Yuki
|
239
249
|
101,Rupert
|
240
250
|
102,Ahmed
|
241
251
|
103,Kwame
|
252
|
+
----
|
242
253
|
|
243
254
|
Example of Mode 1
|
244
255
|
[source,ruby]
|
@@ -1,7 +1,7 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
|
3
3
|
s.name = 'logstash-filter-translate'
|
4
|
-
s.version = '3.2.
|
4
|
+
s.version = '3.2.1'
|
5
5
|
s.licenses = ['Apache License (2.0)']
|
6
6
|
s.summary = "Replaces field contents based on a hash or YAML file"
|
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-translate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Elastic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|