Skip to content

Commit 21cd6f8

Browse files
[panw] Generate processor tags and normalize error handler (#15565)
- Generate tags for processors missing tags - Normalize the pipeline error handler
1 parent b21205a commit 21cd6f8

File tree

18 files changed

+842
-190
lines changed

18 files changed

+842
-190
lines changed

packages/panw/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: "5.3.5"
3+
changes:
4+
- description: Generate processor tags and normalize error handler.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/15565
27
- version: "5.3.4"
38
changes:
49
- description: Fix broken link on the Palo Alto Network Integration page.

packages/panw/data_stream/panos/elasticsearch/ingest_pipeline/audit.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description: Pipeline for PanOS Audit Logs.
33
# API Docs: https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-admin/monitoring/use-syslog-for-monitoring/syslog-field-descriptions/audit-log-fields
44
processors:
55
- csv:
6+
tag: csv_message_4cf41818
67
field: message
78
ignore_failure: true
89
target_fields:
@@ -12,23 +13,28 @@ processors:
1213
- panw.panos.cmd
1314
- event.outcome
1415
- uppercase:
16+
tag: uppercase_panw_panos_type_ec638369
1517
field: panw.panos.type
1618
ignore_missing: true
17-
# Set event.kind & event.category field.
19+
# Set event.kind & event.category field.
1820
- set:
21+
tag: set_event_kind_de80643c
1922
field: event.kind
2023
value: event
2124
- append:
25+
tag: append_event_category_c8ab9fa2
2226
field: event.category
2327
value:
2428
- configuration
2529

26-
# Set custom fields to ECS fields
30+
# Set custom fields to ECS fields
2731
- set:
32+
tag: set_observer_hostname_5bc96c94
2833
field: observer.hostname
2934
copy_from: panw.panos.device_name
3035
ignore_failure: true
3136
- set:
37+
tag: set_source_ip_c1b0f423
3238
field: source.ip
3339
copy_from: panw.panos.source.ip
3440
ignore_failure: true
@@ -40,7 +46,7 @@ on_failure:
4046
- append:
4147
field: error.message
4248
value: >-
43-
error in Audit pipeline:
44-
error in [{{{_ingest.on_failure_processor_type}}}] processor{{{#_ingest.on_failure_processor_tag}}}
45-
with tag [{{{_ingest.on_failure_processor_tag}}}]{{{/_ingest.on_failure_processor_tag}}}
46-
{{{_ingest.on_failure_message}}}
49+
Processor '{{{ _ingest.on_failure_processor_type }}}'
50+
{{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
51+
{{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
52+
failed with message '{{{ _ingest.on_failure_message }}}'

packages/panw/data_stream/panos/elasticsearch/ingest_pipeline/authentication.yml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description: Pipeline for PanOS Authentication Logs.
33
# API Docs: https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-admin/monitoring/use-syslog-for-monitoring/syslog-field-descriptions/authentication-log-fields
44
processors:
55
- csv:
6+
tag: csv_message_4c28b73f
67
field: message
78
ignore_failure: true
89
target_fields:
@@ -47,50 +48,60 @@ processors:
4748
- panw.panos.flow_id
4849

4950
- append:
51+
tag: append_source_user_name_61f77e09
5052
field: source.user.name
5153
value: '{{{_temp_.user}}}'
5254
if: ctx._temp_?.user != null && ctx._temp_.user != ''
5355
allow_duplicates: false
5456
ignore_failure: true
5557
- append:
58+
tag: append_source_user_name_7cf5bcf3
5659
field: source.user.name
5760
value: '{{{panw.panos.normalize_user}}}'
5861
if: ctx.panw?.panos?.normalize_user != null && ctx.panw.panos.normalize_user != ''
5962
allow_duplicates: false
6063
ignore_failure: true
6164

62-
# Set event.kind & event.category field.
65+
# Set event.kind & event.category field.
6366
- set:
67+
tag: set_event_kind_de80643c
6468
field: event.kind
6569
value: event
6670
- append:
71+
tag: append_event_category_c182a53a
6772
field: event.category
6873
value:
6974
- authentication
7075

71-
# Set event.outcome
76+
# Set event.outcome
7277
- set:
78+
tag: set_event_outcome_1af271cd
7379
field: event.outcome
7480
value: success
7581

76-
# Set custom fields to ECS fields
82+
# Set custom fields to ECS fields
7783
- set:
84+
tag: set_observer_hostname_5bc96c94
7885
field: observer.hostname
7986
copy_from: panw.panos.device_name
8087
ignore_failure: true
8188
- set:
89+
tag: set_rule_uuid_5478ecb2
8290
field: rule.uuid
8391
copy_from: panw.panos.rule_uuid
8492
ignore_failure: true
8593
- set:
94+
tag: set_source_ip_c1b0f423
8695
field: source.ip
8796
copy_from: panw.panos.source.ip
8897
ignore_failure: true
8998
- set:
99+
tag: set_panw_panos_user_007bc289
90100
field: panw.panos.user
91101
copy_from: _temp_.user
92102
ignore_failure: true
93103
- set:
104+
tag: set_panw_panos_user_agent_f4b744c1
94105
field: panw.panos.user_agent
95106
copy_from: _temp_.user_agent
96107
ignore_failure: true
@@ -101,7 +112,7 @@ on_failure:
101112
- append:
102113
field: error.message
103114
value: >-
104-
error in Authentication pipeline:
105-
error in [{{{_ingest.on_failure_processor_type}}}] processor{{{#_ingest.on_failure_processor_tag}}}
106-
with tag [{{{_ingest.on_failure_processor_tag}}}]{{{/_ingest.on_failure_processor_tag}}}
107-
{{{_ingest.on_failure_message}}}
115+
Processor '{{{ _ingest.on_failure_processor_type }}}'
116+
{{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
117+
{{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
118+
failed with message '{{{ _ingest.on_failure_message }}}'

packages/panw/data_stream/panos/elasticsearch/ingest_pipeline/config.yml

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description: Pipeline for PanOS Config Logs.
33
# API Docs: https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-admin/monitoring/use-syslog-for-monitoring/syslog-field-descriptions/config-log-fields
44
processors:
55
- csv:
6+
tag: csv_message_e2e3e7de
67
field: message
78
target_fields:
89
- panw.panos.host.ip
@@ -14,6 +15,7 @@ processors:
1415
- panw.panos.path
1516
- _temp_.check_field
1617
- convert:
18+
tag: convert__temp__check_field_5a04d649
1719
field: _temp_.check_field
1820
type: long
1921
ignore_missing: true
@@ -71,6 +73,7 @@ processors:
7173
- _temp_.future_use1
7274
- _temp_.high_res_timestamp
7375
- script:
76+
tag: script_edc601fd
7477
description: Set Event Action.
7578
lang: painless
7679
ignore_failure: true
@@ -84,53 +87,62 @@ processors:
8487
move: cmd-move
8588
rename: cmd-rename
8689
set: cmd-set
87-
source:
88-
ctx.event.action = params.get(ctx.panw.panos.cmd);
90+
source: ctx.event.action = params.get(ctx.panw.panos.cmd);
8991
- set:
92+
tag: set_event_outcome_a8d719f3
9093
field: event.outcome
9194
value: success
9295
ignore_failure: true
9396
if: ctx.panw?.panos?.result == 'Succeeded'
9497
- set:
98+
tag: set_event_outcome_98bc1180
9599
field: event.outcome
96100
value: failure
97101
ignore_failure: true
98102
if: ctx.panw?.panos?.result == 'Failed'
99103
- set:
104+
tag: set_event_outcome_332ce513
100105
field: event.outcome
101106
value: unknown
102107
ignore_failure: true
103108
if: '!["Succeeded", "Failed"].contains(ctx.panw.panos.action)'
104109

105-
# Set event.kind & event.category field.
110+
# Set event.kind & event.category field.
106111
- set:
112+
tag: set_event_kind_de80643c
107113
field: event.kind
108114
value: event
109115
- append:
116+
tag: append_event_category_c8ab9fa2
110117
field: event.category
111118
value:
112119
- configuration
113120

114-
# Set custom fields to ECS fields
121+
# Set custom fields to ECS fields
115122
- set:
123+
tag: set_host_ip_ae377e8b
116124
field: host.ip
117125
copy_from: panw.panos.host.ip
118126
ignore_failure: true
119127
- set:
128+
tag: set_observer_hostname_5bc96c94
120129
field: observer.hostname
121130
copy_from: panw.panos.device_name
122131
ignore_failure: true
123132

124-
# Set event.outcome from panw.panos.result: documented allowed values are Submitted, Succeeded, Failed, and Unauthorized
133+
# Set event.outcome from panw.panos.result: documented allowed values are Submitted, Succeeded, Failed, and Unauthorized
125134
- set:
135+
tag: set_event_outcome_057c7750
126136
if: ctx.panw?.panos?.result == "Succeeded"
127137
field: event.outcome
128138
value: success
129139
- set:
140+
tag: set_event_outcome_777b32fd
130141
if: ctx.panw?.panos?.result == "Failed"
131142
field: event.outcome
132143
value: failure
133144
- set:
145+
tag: set_event_outcome_bcf074fb
134146
if: ctx.event?.outcome == null || ctx.event.outcome == ""
135147
field: event.outcome
136148
value: unknown
@@ -142,7 +154,7 @@ on_failure:
142154
- append:
143155
field: error.message
144156
value: >-
145-
error in Config pipeline:
146-
error in [{{{_ingest.on_failure_processor_type}}}] processor{{{#_ingest.on_failure_processor_tag}}}
147-
with tag [{{{_ingest.on_failure_processor_tag}}}]{{{/_ingest.on_failure_processor_tag}}}
148-
{{{_ingest.on_failure_message}}}
157+
Processor '{{{ _ingest.on_failure_processor_type }}}'
158+
{{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
159+
{{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
160+
failed with message '{{{ _ingest.on_failure_message }}}'

packages/panw/data_stream/panos/elasticsearch/ingest_pipeline/correlated_event.yml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ description: Pipeline for PanOS Correlated Event Logs.
33
# API Docs: https://docs.paloaltonetworks.com/pan-os/10-2/pan-os-admin/monitoring/use-syslog-for-monitoring/syslog-field-descriptions/correlated-events-log-fields
44
processors:
55
- csv:
6+
tag: csv_message_9f7a7cd8
67
field: message
78
ignore_failure: true
89
target_fields:
@@ -22,30 +23,36 @@ processors:
2223
- panw.panos.object.id
2324
- panw.panos.evidence
2425

25-
# Set event.kind & event.category field.
26+
# Set event.kind & event.category field.
2627
- set:
28+
tag: set_event_kind_de80643c
2729
field: event.kind
2830
value: event
2931
- append:
32+
tag: append_event_category_38e4ac56
3033
field: event.category
3134
value:
3235
- network
3336

34-
# Set event.outcome
37+
# Set event.outcome
3538
- set:
39+
tag: set_event_outcome_1af271cd
3640
field: event.outcome
3741
value: success
3842

39-
# Set custom fields to ECS fields
43+
# Set custom fields to ECS fields
4044
- set:
45+
tag: set_log_level_ed3c9f74
4146
field: log.level
4247
copy_from: panw.panos.severity
4348
ignore_failure: true
4449
- set:
50+
tag: set_observer_hostname_5bc96c94
4551
field: observer.hostname
4652
copy_from: panw.panos.device_name
4753
ignore_failure: true
4854
- set:
55+
tag: set_source_ip_c1b0f423
4956
field: source.ip
5057
copy_from: panw.panos.source.ip
5158
ignore_failure: true
@@ -57,7 +64,7 @@ on_failure:
5764
- append:
5865
field: error.message
5966
value: >-
60-
error in Correlated Event pipeline:
61-
error in [{{{_ingest.on_failure_processor_type}}}] processor{{{#_ingest.on_failure_processor_tag}}}
62-
with tag [{{{_ingest.on_failure_processor_tag}}}]{{{/_ingest.on_failure_processor_tag}}}
63-
{{{_ingest.on_failure_message}}}
67+
Processor '{{{ _ingest.on_failure_processor_type }}}'
68+
{{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
69+
{{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
70+
failed with message '{{{ _ingest.on_failure_message }}}'

0 commit comments

Comments
 (0)