17
17
* under the License.
18
18
*/
19
19
20
+ const commonPipelineParams = {
21
+ on_failure : [ ] ,
22
+ if : ''
23
+ } ;
24
+
20
25
// Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/append-processor.html
21
26
const appendProcessorDefinition = {
22
27
append : {
@@ -25,7 +30,23 @@ const appendProcessorDefinition = {
25
30
value : [ ]
26
31
} ,
27
32
field : '' ,
28
- value : [ ]
33
+ value : [ ] ,
34
+ ...commonPipelineParams
35
+ }
36
+ } ;
37
+
38
+ // Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/bytes-processor.html
39
+ const bytesProcessorDefinition = {
40
+ bytes : {
41
+ __template : {
42
+ field : ''
43
+ } ,
44
+ field : '' ,
45
+ target_field : '' ,
46
+ ignore_missing : {
47
+ __one_of : [ false , true ]
48
+ } ,
49
+ ...commonPipelineParams
29
50
}
30
51
} ;
31
52
@@ -43,7 +64,8 @@ const convertProcessorDefinition = {
43
64
target_field : '' ,
44
65
ignore_missing : {
45
66
__one_of : [ false , true ]
46
- }
67
+ } ,
68
+ ...commonPipelineParams
47
69
}
48
70
} ;
49
71
@@ -58,7 +80,8 @@ const dateProcessorDefinition = {
58
80
target_field : '@timestamp' ,
59
81
formats : [ ] ,
60
82
timezone : 'UTC' ,
61
- locale : 'ENGLISH'
83
+ locale : 'ENGLISH' ,
84
+ ...commonPipelineParams
62
85
}
63
86
} ;
64
87
@@ -76,7 +99,45 @@ const dateIndexNameProcessorDefinition = {
76
99
date_formats : [ ] ,
77
100
timezone : 'UTC' ,
78
101
locale : 'ENGLISH' ,
79
- index_name_format : 'yyyy-MM-dd'
102
+ index_name_format : 'yyyy-MM-dd' ,
103
+ ...commonPipelineParams
104
+ }
105
+ } ;
106
+
107
+ // Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/dissect-processor.html
108
+ const dissectProcessorDefinition = {
109
+ dissect : {
110
+ __template : {
111
+ field : '' ,
112
+ pattern : ''
113
+ } ,
114
+ field : '' ,
115
+ pattern : '' ,
116
+ append_separator : '' ,
117
+ ignore_missing : {
118
+ __one_of : [ false , true ]
119
+ } ,
120
+ ...commonPipelineParams
121
+ }
122
+ } ;
123
+
124
+ // Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/dot-expand-processor.html
125
+ const dotExpanderProcessorDefinition = {
126
+ dot_expander : {
127
+ __template : {
128
+ field : ''
129
+ } ,
130
+ field : '' ,
131
+ path : '' ,
132
+ ...commonPipelineParams
133
+ }
134
+ } ;
135
+
136
+ // Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/drop-processor.html
137
+ const dropProcessorDefinition = {
138
+ drop : {
139
+ __template : { } ,
140
+ ...commonPipelineParams
80
141
}
81
142
} ;
82
143
@@ -86,7 +147,8 @@ const failProcessorDefinition = {
86
147
__template : {
87
148
message : ''
88
149
} ,
89
- message : ''
150
+ message : '' ,
151
+ ...commonPipelineParams
90
152
}
91
153
} ;
92
154
@@ -100,7 +162,8 @@ const foreachProcessorDefinition = {
100
162
field : '' ,
101
163
processor : {
102
164
__scope_link : '_processor'
103
- }
165
+ } ,
166
+ ...commonPipelineParams
104
167
}
105
168
} ;
106
169
@@ -119,7 +182,8 @@ const grokProcessorDefinition = {
119
182
} ,
120
183
ignore_missing : {
121
184
__one_of : [ false , true ]
122
- }
185
+ } ,
186
+ ...commonPipelineParams
123
187
}
124
188
} ;
125
189
@@ -133,7 +197,8 @@ const gsubProcessorDefinition = {
133
197
} ,
134
198
field : '' ,
135
199
pattern : '' ,
136
- replacement : ''
200
+ replacement : '' ,
201
+ ...commonPipelineParams
137
202
}
138
203
} ;
139
204
@@ -145,7 +210,8 @@ const joinProcessorDefinition = {
145
210
separator : ''
146
211
} ,
147
212
field : '' ,
148
- separator : ''
213
+ separator : '' ,
214
+ ...commonPipelineParams
149
215
}
150
216
} ;
151
217
@@ -159,7 +225,8 @@ const jsonProcessorDefinition = {
159
225
target_field : '' ,
160
226
add_to_root : {
161
227
__one_of : [ false , true ]
162
- }
228
+ } ,
229
+ ...commonPipelineParams
163
230
}
164
231
} ;
165
232
@@ -178,7 +245,8 @@ const kvProcessorDefinition = {
178
245
include_keys : [ ] ,
179
246
ignore_missing : {
180
247
__one_of : [ false , true ]
181
- }
248
+ } ,
249
+ ...commonPipelineParams
182
250
}
183
251
} ;
184
252
@@ -191,7 +259,19 @@ const lowercaseProcessorDefinition = {
191
259
field : '' ,
192
260
ignore_missing : {
193
261
__one_of : [ false , true ]
194
- }
262
+ } ,
263
+ ...commonPipelineParams
264
+ }
265
+ } ;
266
+
267
+ // Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/pipeline-processor.html
268
+ const pipelineProcessorDefinition = {
269
+ pipeline : {
270
+ __template : {
271
+ pipeline : ''
272
+ } ,
273
+ pipeline : '' ,
274
+ ...commonPipelineParams
195
275
}
196
276
} ;
197
277
@@ -201,7 +281,8 @@ const removeProcessorDefinition = {
201
281
__template : {
202
282
field : ''
203
283
} ,
204
- field : ''
284
+ field : '' ,
285
+ ...commonPipelineParams
205
286
}
206
287
} ;
207
288
@@ -216,7 +297,8 @@ const renameProcessorDefinition = {
216
297
target_field : '' ,
217
298
ignore_missing : {
218
299
__one_of : [ false , true ]
219
- }
300
+ } ,
301
+ ...commonPipelineParams
220
302
}
221
303
} ;
222
304
@@ -228,7 +310,8 @@ const scriptProcessorDefinition = {
228
310
file : '' ,
229
311
id : '' ,
230
312
inline : '' ,
231
- params : { }
313
+ params : { } ,
314
+ ...commonPipelineParams
232
315
}
233
316
} ;
234
317
@@ -243,7 +326,8 @@ const setProcessorDefinition = {
243
326
value : '' ,
244
327
override : {
245
328
__one_of : [ true , false ]
246
- }
329
+ } ,
330
+ ...commonPipelineParams
247
331
}
248
332
} ;
249
333
@@ -258,7 +342,8 @@ const splitProcessorDefinition = {
258
342
separator : '' ,
259
343
ignore_missing : {
260
344
__one_of : [ false , true ]
261
- }
345
+ } ,
346
+ ...commonPipelineParams
262
347
}
263
348
} ;
264
349
@@ -269,7 +354,8 @@ const sortProcessorDefinition = {
269
354
field : ''
270
355
} ,
271
356
field : '' ,
272
- order : 'asc'
357
+ order : 'asc' ,
358
+ ...commonPipelineParams
273
359
}
274
360
} ;
275
361
@@ -282,7 +368,8 @@ const trimProcessorDefinition = {
282
368
field : '' ,
283
369
ignore_missing : {
284
370
__one_of : [ false , true ]
285
- }
371
+ } ,
372
+ ...commonPipelineParams
286
373
}
287
374
} ;
288
375
@@ -295,27 +382,21 @@ const uppercaseProcessorDefinition = {
295
382
field : '' ,
296
383
ignore_missing : {
297
384
__one_of : [ false , true ]
298
- }
299
- }
300
- } ;
301
-
302
- // Based on https://www.elastic.co/guide/en/elasticsearch/reference/master/dot-expand-processor.html
303
- const dotExpanderProcessorDefinition = {
304
- dot_expander : {
305
- __template : {
306
- field : ''
307
385
} ,
308
- field : '' ,
309
- path : ''
386
+ ...commonPipelineParams
310
387
}
311
388
} ;
312
389
313
390
const processorDefinition = {
314
391
__one_of : [
315
392
appendProcessorDefinition ,
393
+ bytesProcessorDefinition ,
316
394
convertProcessorDefinition ,
317
395
dateProcessorDefinition ,
318
396
dateIndexNameProcessorDefinition ,
397
+ dissectProcessorDefinition ,
398
+ dotExpanderProcessorDefinition ,
399
+ dropProcessorDefinition ,
319
400
failProcessorDefinition ,
320
401
foreachProcessorDefinition ,
321
402
grokProcessorDefinition ,
@@ -324,15 +405,15 @@ const processorDefinition = {
324
405
jsonProcessorDefinition ,
325
406
kvProcessorDefinition ,
326
407
lowercaseProcessorDefinition ,
408
+ pipelineProcessorDefinition ,
327
409
removeProcessorDefinition ,
328
410
renameProcessorDefinition ,
329
411
scriptProcessorDefinition ,
330
412
setProcessorDefinition ,
331
413
splitProcessorDefinition ,
332
414
sortProcessorDefinition ,
333
415
trimProcessorDefinition ,
334
- uppercaseProcessorDefinition ,
335
- dotExpanderProcessorDefinition
416
+ uppercaseProcessorDefinition
336
417
]
337
418
} ;
338
419
@@ -344,7 +425,6 @@ const pipelineDefinition = {
344
425
version : 123 ,
345
426
} ;
346
427
347
-
348
428
export default function ( api ) {
349
429
350
430
// Note: this isn't an actual API endpoint. It exists so the forEach processor's "processor" field
0 commit comments