Skip to content

Commit 767cf92

Browse files
[zeek] Generate processor tags and normalize error handler (#15721)
- Generate tags for processors missing tags - Normalize the pipeline error handler
1 parent a2f524a commit 767cf92

File tree

88 files changed

+2622
-208
lines changed

Some content is hidden

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

88 files changed

+2622
-208
lines changed

packages/zeek/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: "3.0.3"
3+
changes:
4+
- description: Generate processor tags and normalize error handler.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/15721
27
- version: "3.0.2"
38
changes:
49
- description: Remove unused agent files.

packages/zeek/data_stream/capture_loss/elasticsearch/ingest_pipeline/default.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,57 @@
22
description: Pipeline for normalizing Zeek capture_loss.log
33
processors:
44
- rename:
5+
tag: rename_message_to_event_original_56a77271
56
field: message
67
target_field: event.original
78
ignore_missing: true
89
if: ctx.event?.original == null
910
- json:
11+
tag: json_event_original_to__temp__7408cf8c
1012
field: event.original
1113
target_field: _temp_
1214
- pipeline:
15+
tag: pipeline_c69a6660
1316
if: ctx?._temp_?.result != null
1417
name: '{{ IngestPipeline "third-party" }}'
1518
- drop:
19+
tag: drop_c70c3de1
1620
description: Drop if no timestamp (invalid json)
1721
if: 'ctx?._temp_?.ts == null'
1822
- rename:
23+
tag: rename__temp__to_zeek_capture_loss_62ef1b3a
1924
target_field: zeek.capture_loss
2025
field: _temp_
2126
# Sets event.created from the @timestamp field generated by filebeat before being overwritten further down
2227
- set:
28+
tag: set_event_created_e3f09e3b
2329
field: event.created
2430
copy_from: "@timestamp"
2531
- set:
32+
tag: set_ecs_version_f5923549
2633
field: ecs.version
2734
value: '8.17.0'
2835
- date:
36+
tag: date_zeek_capture_loss_ts_aa14509f
2937
field: zeek.capture_loss.ts
3038
formats:
3139
- UNIX
3240
- ISO8601
3341
- set:
42+
tag: set_event_kind_495d69f0
3443
field: event.kind
3544
value: metric
3645
- set:
46+
tag: set_event_type_ec95f7f2
3747
field: event.type
3848
value: [info]
3949
- convert:
50+
tag: convert_zeek_percent_lost_b0ba2ad8
4051
field: zeek.percent_lost
4152
type: long
4253
ignore_missing: true
4354
- remove:
55+
tag: remove_73e0896e
4456
field:
4557
- zeek.capture_loss.ts
4658
ignore_missing: true
@@ -50,4 +62,8 @@ on_failure:
5062
value: pipeline_error
5163
- append:
5264
field: error.message
53-
value: '{{{ _ingest.on_failure_message }}}'
65+
value: >-
66+
Processor '{{{ _ingest.on_failure_processor_type }}}'
67+
{{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
68+
{{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
69+
failed with message '{{{ _ingest.on_failure_message }}}'

packages/zeek/data_stream/capture_loss/elasticsearch/ingest_pipeline/third-party.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
description: Pipeline for parsing Zeek logs from third party api
33
processors:
44
- fingerprint:
5+
tag: fingerprint_8e6b679f
56
fields:
67
- _temp_.result._cd
78
- _temp_.result._indextime
@@ -12,21 +13,26 @@ processors:
1213
target_field: '_id'
1314
ignore_missing: true
1415
- set:
16+
tag: set_event_original_5bbfe67e
1517
field: event.original
1618
copy_from: _temp_.result._raw
1719
ignore_empty_value: true
1820
- set:
21+
tag: set_host_name_d99bf8df
1922
field: host.name
2023
copy_from: _temp_.result.host
2124
ignore_empty_value: true
2225
- set:
26+
tag: set_log_file_path_76cd6132
2327
copy_from: _temp_.result.source
2428
field: log.file.path
2529
ignore_empty_value: true
2630
- remove:
31+
tag: remove__temp__fc21405e
2732
field: _temp_
2833
ignore_missing: true
2934
- json:
35+
tag: json_event_original_to__temp__7408cf8c
3036
field: event.original
3137
target_field: _temp_
3238
on_failure:
@@ -36,7 +42,7 @@ on_failure:
3642
- append:
3743
field: error.message
3844
value: >-
39-
error in third party api pipeline:
40-
error in [{{{_ingest.on_failure_processor_type}}}] processor{{{#_ingest.on_failure_processor_tag}}}
41-
with tag [{{{_ingest.on_failure_processor_tag }}}]{{{/_ingest.on_failure_processor_tag}}}
42-
{{{ _ingest.on_failure_message }}}
45+
Processor '{{{ _ingest.on_failure_processor_type }}}'
46+
{{#_ingest.on_failure_processor_tag}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
47+
{{/_ingest.on_failure_processor_tag}}in pipeline '{{{ _ingest.pipeline }}}'
48+
failed with message '{{{ _ingest.on_failure_message }}}'

packages/zeek/data_stream/capture_loss/manifest.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,3 @@ streams:
4040
template_path: log.yml.hbs
4141
title: Zeek capture_loss.log
4242
description: Collect Zeek capture_loss logs
43-

0 commit comments

Comments
 (0)