Skip to content

Commit 7ac58ca

Browse files
committed
Cherry-pick with conflict resolution
Fixes #754
1 parent 1c23eb1 commit 7ac58ca

File tree

4 files changed

+93
-1
lines changed

4 files changed

+93
-1
lines changed

docs/plugins/filters/alter.asciidoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,16 @@ Field names can be dynamic and include parts of the event using the `%{field}`.
6161

6262
Example:
6363
[source,ruby]
64+
-----
6465
filter {
6566
alter {
6667
add_field => { "foo_%{somefield}" => "Hello world, from %{host}" }
6768
}
6869
}
70+
-----
71+
6972
[source,ruby]
73+
-----
7074
# You can also add multiple fields at once:
7175
filter {
7276
alter {
@@ -76,6 +80,7 @@ Example:
7680
}
7781
}
7882
}
83+
-----
7984

8085
If the event has field `"somefield" == "hello"` this filter, on success,
8186
would add field `foo_hello` if it is present, with the
@@ -94,18 +99,23 @@ syntax.
9499

95100
Example:
96101
[source,ruby]
102+
-----
97103
filter {
98104
alter {
99105
add_tag => [ "foo_%{somefield}" ]
100106
}
101107
}
108+
-----
109+
102110
[source,ruby]
111+
-----
103112
# You can also add multiple tags at once:
104113
filter {
105114
alter {
106115
add_tag => [ "foo_%{somefield}", "taggedy_tag"]
107116
}
108117
}
118+
-----
109119

110120
If the event has field `"somefield" == "hello"` this filter, on success,
111121
would add a tag `foo_hello` (and the second example would of course add a `taggedy_tag` tag).
@@ -120,13 +130,15 @@ Sets the value of field_name to the first nonnull expression among its arguments
120130

121131
Example:
122132
[source,ruby]
133+
-----
123134
filter {
124135
alter {
125136
coalesce => [
126137
"field_name", "value1", "value2", "value3", ...
127138
]
128139
}
129140
}
141+
-----
130142

131143
[[plugins-filters-alter-condrewrite]]
132144
===== `condrewrite`
@@ -139,6 +151,7 @@ if the actual content is equal to the expected one.
139151

140152
Example:
141153
[source,ruby]
154+
-----
142155
filter {
143156
alter {
144157
condrewrite => [
@@ -148,6 +161,7 @@ Example:
148161
]
149162
}
150163
}
164+
-----
151165

152166
[[plugins-filters-alter-condrewriteother]]
153167
===== `condrewriteother`
@@ -160,6 +174,7 @@ if the content of another field is equal to the expected one.
160174

161175
Example:
162176
[source,ruby]
177+
-----
163178
filter {
164179
alter {
165180
condrewriteother => [
@@ -169,6 +184,7 @@ Example:
169184
]
170185
}
171186
}
187+
-----
172188

173189
[[plugins-filters-alter-periodic_flush]]
174190
===== `periodic_flush`
@@ -188,19 +204,25 @@ Optional.
188204
If this filter is successful, remove arbitrary fields from this event.
189205
Fields names can be dynamic and include parts of the event using the %{field}
190206
Example:
207+
191208
[source,ruby]
209+
-----
192210
filter {
193211
alter {
194212
remove_field => [ "foo_%{somefield}" ]
195213
}
196214
}
215+
-----
216+
197217
[source,ruby]
218+
-----
198219
# You can also remove multiple fields at once:
199220
filter {
200221
alter {
201222
remove_field => [ "foo_%{somefield}", "my_extraneous_field" ]
202223
}
203224
}
225+
-----
204226

205227
If the event has field `"somefield" == "hello"` this filter, on success,
206228
would remove the field with name `foo_hello` if it is present. The second
@@ -218,18 +240,23 @@ syntax.
218240

219241
Example:
220242
[source,ruby]
243+
-----
221244
filter {
222245
alter {
223246
remove_tag => [ "foo_%{somefield}" ]
224247
}
225248
}
249+
-----
250+
226251
[source,ruby]
252+
-----
227253
# You can also remove multiple tags at once:
228254
filter {
229255
alter {
230256
remove_tag => [ "foo_%{somefield}", "sad_unwanted_tag"]
231257
}
232258
}
259+
-----
233260

234261
If the event has field `"somefield" == "hello"` this filter, on success,
235262
would remove the tag `foo_hello` if it is present. The second example

docs/plugins/filters/anonymize.asciidoc

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ anonymize {
2525

2626

2727

28-
Available configuration options:
28+
==== Available configuration options
2929

3030
[cols="<,<,<,<m",options="header",]
3131
|=======================================================================
@@ -57,12 +57,16 @@ Field names can be dynamic and include parts of the event using the `%{field}`.
5757

5858
Example:
5959
[source,ruby]
60+
-----
6061
filter {
6162
anonymize {
6263
add_field => { "foo_%{somefield}" => "Hello world, from %{host}" }
6364
}
6465
}
66+
-----
67+
6568
[source,ruby]
69+
-----
6670
# You can also add multiple fields at once:
6771
filter {
6872
anonymize {
@@ -72,6 +76,7 @@ Example:
7276
}
7377
}
7478
}
79+
-----
7580

7681
If the event has field `"somefield" == "hello"` this filter, on success,
7782
would add field `foo_hello` if it is present, with the
@@ -90,18 +95,23 @@ syntax.
9095

9196
Example:
9297
[source,ruby]
98+
-----
9399
filter {
94100
anonymize {
95101
add_tag => [ "foo_%{somefield}" ]
96102
}
97103
}
104+
-----
105+
98106
[source,ruby]
107+
-----
99108
# You can also add multiple tags at once:
100109
filter {
101110
anonymize {
102111
add_tag => [ "foo_%{somefield}", "taggedy_tag"]
103112
}
104113
}
114+
-----
105115

106116
If the event has field `"somefield" == "hello"` this filter, on success,
107117
would add a tag `foo_hello` (and the second example would of course add a `taggedy_tag` tag).
@@ -152,20 +162,26 @@ Optional.
152162

153163
If this filter is successful, remove arbitrary fields from this event.
154164
Fields names can be dynamic and include parts of the event using the %{field}
165+
155166
Example:
156167
[source,ruby]
168+
-----
157169
filter {
158170
anonymize {
159171
remove_field => [ "foo_%{somefield}" ]
160172
}
161173
}
174+
-----
175+
162176
[source,ruby]
177+
-----
163178
# You can also remove multiple fields at once:
164179
filter {
165180
anonymize {
166181
remove_field => [ "foo_%{somefield}", "my_extraneous_field" ]
167182
}
168183
}
184+
-----
169185

170186
If the event has field `"somefield" == "hello"` this filter, on success,
171187
would remove the field with name `foo_hello` if it is present. The second
@@ -183,18 +199,23 @@ syntax.
183199

184200
Example:
185201
[source,ruby]
202+
-----
186203
filter {
187204
anonymize {
188205
remove_tag => [ "foo_%{somefield}" ]
189206
}
190207
}
208+
-----
209+
191210
[source,ruby]
211+
-----
192212
# You can also remove multiple tags at once:
193213
filter {
194214
anonymize {
195215
remove_tag => [ "foo_%{somefield}", "sad_unwanted_tag"]
196216
}
197217
}
218+
-----
198219

199220
If the event has field `"somefield" == "hello"` this filter, on success,
200221
would remove the tag `foo_hello` if it is present. The second example

docs/plugins/filters/cidr.asciidoc

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,16 @@ Field names can be dynamic and include parts of the event using the `%{field}`.
5858

5959
Example:
6060
[source,ruby]
61+
-----
6162
filter {
6263
cidr {
6364
add_field => { "foo_%{somefield}" => "Hello world, from %{host}" }
6465
}
6566
}
67+
-----
68+
6669
[source,ruby]
70+
-----
6771
# You can also add multiple fields at once:
6872
filter {
6973
cidr {
@@ -73,6 +77,7 @@ Example:
7377
}
7478
}
7579
}
80+
-----
7681

7782
If the event has field `"somefield" == "hello"` this filter, on success,
7883
would add field `foo_hello` if it is present, with the
@@ -91,18 +96,23 @@ syntax.
9196

9297
Example:
9398
[source,ruby]
99+
-----
94100
filter {
95101
cidr {
96102
add_tag => [ "foo_%{somefield}" ]
97103
}
98104
}
105+
-----
106+
99107
[source,ruby]
108+
-----
100109
# You can also add multiple tags at once:
101110
filter {
102111
cidr {
103112
add_tag => [ "foo_%{somefield}", "taggedy_tag"]
104113
}
105114
}
115+
-----
106116

107117
If the event has field `"somefield" == "hello"` this filter, on success,
108118
would add a tag `foo_hello` (and the second example would of course add a `taggedy_tag` tag).
@@ -115,13 +125,15 @@ would add a tag `foo_hello` (and the second example would of course add a `tagge
115125

116126
The IP address(es) to check with. Example:
117127
[source,ruby]
128+
-----
118129
filter {
119130
cidr {
120131
add_tag => [ "testnet" ]
121132
address => [ "%{src_ip}", "%{dst_ip}" ]
122133
network => [ "192.0.2.0/24" ]
123134
}
124135
}
136+
-----
125137

126138
[[plugins-filters-cidr-network]]
127139
===== `network`
@@ -156,20 +168,26 @@ Optional.
156168

157169
If this filter is successful, remove arbitrary fields from this event.
158170
Fields names can be dynamic and include parts of the event using the %{field}
171+
159172
Example:
160173
[source,ruby]
174+
-----
161175
filter {
162176
cidr {
163177
remove_field => [ "foo_%{somefield}" ]
164178
}
165179
}
180+
-----
181+
166182
[source,ruby]
183+
-----
167184
# You can also remove multiple fields at once:
168185
filter {
169186
cidr {
170187
remove_field => [ "foo_%{somefield}", "my_extraneous_field" ]
171188
}
172189
}
190+
-----
173191

174192
If the event has field `"somefield" == "hello"` this filter, on success,
175193
would remove the field with name `foo_hello` if it is present. The second
@@ -187,18 +205,23 @@ syntax.
187205

188206
Example:
189207
[source,ruby]
208+
-----
190209
filter {
191210
cidr {
192211
remove_tag => [ "foo_%{somefield}" ]
193212
}
194213
}
214+
-----
215+
195216
[source,ruby]
217+
-----
196218
# You can also remove multiple tags at once:
197219
filter {
198220
cidr {
199221
remove_tag => [ "foo_%{somefield}", "sad_unwanted_tag"]
200222
}
201223
}
224+
-----
202225

203226
If the event has field `"somefield" == "hello"` this filter, on success,
204227
would remove the tag `foo_hello` if it is present. The second example

0 commit comments

Comments
 (0)