Skip to content

Commit 766916f

Browse files
feat: Preserve event.original when errors occur in pipelines
- Added append processor to global on_failure to preserve event original - Added append processor to default pipelines to preserve event original if error.message is set Affects the following integrations: - citrix_waf - endace - fortinet_fortiedr - fortinet_fortigate - fortinet_fortimail - fortinet_fortimanager - fortinet_fortiproxy - goflow2 - hashicorp_vault - hpe_aruba_cx
1 parent 8477eb1 commit 766916f

File tree

53 files changed

+276
-17
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+276
-17
lines changed

packages/citrix_waf/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "1.19.0"
3+
changes:
4+
- description: Preserve event.original on pipeline error.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/15803
27
- version: "1.18.3"
38
changes:
49
- description: Generate processor tags and normalize error handler.

packages/citrix_waf/data_stream/log/elasticsearch/ingest_pipeline/cef.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,7 @@ on_failure:
135135
{{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
136136
{{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
137137
failed with message '{{{ _ingest.on_failure_message }}}'
138+
- append:
139+
field: tags
140+
value: preserve_original_event
141+
allow_duplicates: false

packages/citrix_waf/data_stream/log/elasticsearch/ingest_pipeline/default.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,12 @@ processors:
166166
- _tmp
167167
- _conf
168168
ignore_missing: true
169+
- append:
170+
tag: append_preserve_original_event_on_error
171+
field: tags
172+
value: preserve_original_event
173+
allow_duplicates: false
174+
if: ctx.error?.message != null
169175
on_failure:
170176
- remove:
171177
field:
@@ -182,3 +188,7 @@ on_failure:
182188
{{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
183189
{{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
184190
failed with message '{{{ _ingest.on_failure_message }}}'
191+
- append:
192+
field: tags
193+
value: preserve_original_event
194+
allow_duplicates: false

packages/citrix_waf/data_stream/log/elasticsearch/ingest_pipeline/native.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,7 @@ on_failure:
3939
{{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
4040
{{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
4141
failed with message '{{{ _ingest.on_failure_message }}}'
42+
- append:
43+
field: tags
44+
value: preserve_original_event
45+
allow_duplicates: false

packages/citrix_waf/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
format_version: "3.0.3"
22
name: citrix_waf
33
title: "Citrix Web App Firewall"
4-
version: "1.18.3"
4+
version: "1.19.0"
55
description: Ingest events from Citrix Systems Web App Firewall.
66
type: integration
77
categories:

packages/endace/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "0.2.0"
3+
changes:
4+
- description: Preserve event.original on pipeline error.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/15803
27
- version: "0.1.2"
38
changes:
49
- description: Normalize error handler.

packages/endace/data_stream/flow/elasticsearch/ingest_pipeline/compatibility.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ on_failure:
3434
- set:
3535
field: event.kind
3636
value: pipeline_error
37+
- append:
38+
field: tags
39+
value: preserve_original_event
40+
allow_duplicates: false

packages/endace/data_stream/flow/elasticsearch/ingest_pipeline/default.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,12 @@ processors:
109109
field: _conf
110110
ignore_missing: true
111111
tag: remove_conf
112+
- append:
113+
tag: append_preserve_original_event_on_error
114+
field: tags
115+
value: preserve_original_event
116+
allow_duplicates: false
117+
if: ctx.error?.message != null
112118

113119
on_failure:
114120
- append:
@@ -118,3 +124,7 @@ on_failure:
118124
- set:
119125
field: event.kind
120126
value: pipeline_error
127+
- append:
128+
field: tags
129+
value: preserve_original_event
130+
allow_duplicates: false

packages/endace/data_stream/flow/elasticsearch/ingest_pipeline/endace.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ processors:
77
value: "ip_conv={{ source.ip }}%26{{ destination.ip }}"
88
if: (ctx.destination?.ip != null && ctx.destination?.ip != '') && (ctx.source?.ip != null && ctx.source?.ip != '')
99
tag: endace conversation set
10-
11-
- set:
10+
11+
- set:
1212
description: "Set IP Conversation if only destination.ip is present"
1313
field: _conf.ip_conv
1414
value: "ip={{ destination.ip }}"
1515
if: (ctx.destination?.ip != null && ctx.destination.ip != '') && (ctx.source?.ip == null || ctx.source?.ip == '')
1616
tag: endace destination ip set
1717

18-
- set:
18+
- set:
1919
description: "Set IP Conversation if only source.ip is present"
2020
field: _conf.ip_conv
2121
value: "ip={{ source.ip }}"
@@ -90,3 +90,7 @@ on_failure:
9090
field: event.kind
9191
description: "Event Kind"
9292
value: pipeline_error
93+
- append:
94+
field: tags
95+
value: preserve_original_event
96+
allow_duplicates: false

packages/endace/data_stream/flow/elasticsearch/ingest_pipeline/geoip.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,7 @@ on_failure:
109109
- set:
110110
field: event.kind
111111
value: pipeline_error
112+
- append:
113+
field: tags
114+
value: preserve_original_event
115+
allow_duplicates: false

0 commit comments

Comments
 (0)