Skip to content

Commit 910a126

Browse files
authored
[aws] Add processor tags to ingest pipelines (#19824)
Add `tag` fields to every processor in all AWS ingest pipelines using `elastic-package modify --modifiers pipeline-tag`. Also update `on_failure` error messages to include `_ingest.pipeline` per the SVR00009 linter rule. Both are requirements that will be enforced when the AWS package format_version is bumped to 3.6.0. Also fix two pre-existing duplicate processors exposed by the tagging: - cloudfront_logs/default.yml: duplicate x-edge-response-result-type rename - rds/default.yml: duplicate FreeStorageSpace rename Fixes cloudfront_logs/pipeline_process_ip.yml which was missing a pipeline-level on_failure block (SVR00008/SVR00009).
1 parent 94398a0 commit 910a126

42 files changed

Lines changed: 2211 additions & 104 deletions

File tree

Some content is hidden

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

packages/aws/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: "6.20.3"
3+
changes:
4+
- description: Add processor tags to all ingest pipeline processors to satisfy elastic-package linter requirements for format_version 3.6.0 and above.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/19824
27
- version: "6.20.2"
38
changes:
49
- description: Skip AWS service-linked Config rules when collecting compliance details so the AWS Config data stream no longer degrades on `AccessDeniedException`, and treat per-rule compliance errors as non-fatal so a single failing rule does not stop ingestion of the rest.

packages/aws/data_stream/apigateway_logs/elasticsearch/ingest_pipeline/default.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,85 +3,105 @@ description: "Pipeline for API Gateway logs in CloudWatch"
33

44
processors:
55
- set:
6+
tag: set_ecs_version_0f7334bb
67
field: ecs.version
78
value: '8.11.0'
89
- rename:
10+
tag: rename_message_to_event_original_c74b1d7e
911
field: message
1012
target_field: event.original
1113
ignore_missing: true
1214
if: 'ctx.event?.original == null'
1315
description: 'Renames the original `message` field to `event.original` to store a copy of the original message. The `event.original` field is not touched if the document already has one; it may happen when Logstash sends the document.'
1416
- remove:
17+
tag: remove_message_2ee3a7d4
1518
field: message
1619
ignore_missing: true
1720
if: 'ctx.event?.original != null'
1821
description: 'The `message` field is no longer required if the document has an `event.original` field.'
1922
- json:
23+
tag: json_event_original_to_aws_apigateway_f58e2e48
2024
field: event.original
2125
target_field: aws.apigateway
2226
ignore_failure: true
2327
- rename:
28+
tag: rename_aws_apigateway_requestId_to_aws_apigateway_request_id_f8d45745
2429
field: aws.apigateway.requestId
2530
target_field: aws.apigateway.request_id
2631
ignore_missing: true
2732
- rename:
33+
tag: rename_aws_apigateway_responseLength_to_aws_apigateway_response_length_351accf5
2834
field: aws.apigateway.responseLength
2935
target_field: aws.apigateway.response_length
3036
ignore_missing: true
3137
- rename:
38+
tag: rename_aws_apigateway_requestTime_to_aws_apigateway_request_time_452b54dd
3239
field: aws.apigateway.requestTime
3340
target_field: aws.apigateway.request_time
3441
ignore_missing: true
3542
- rename:
43+
tag: rename_aws_apigateway_httpMethod_to_aws_apigateway_http_method_0f8ceff7
3644
field: aws.apigateway.httpMethod
3745
target_field: aws.apigateway.http_method
3846
ignore_missing: true
3947
- rename:
48+
tag: rename_aws_apigateway_routeKey_to_aws_apigateway_route_key_24f23c8b
4049
field: aws.apigateway.routeKey
4150
target_field: aws.apigateway.route_key
4251
ignore_missing: true
4352
- rename:
53+
tag: rename_aws_apigateway_ip_to_aws_apigateway_ip_address_bcb43f2f
4454
field: aws.apigateway.ip
4555
target_field: aws.apigateway.ip_address
4656
ignore_missing: true
4757
- rename:
58+
tag: rename_aws_apigateway_resourcePath_to_aws_apigateway_resource_path_a086dd8b
4859
field: aws.apigateway.resourcePath
4960
target_field: aws.apigateway.resource_path
5061
ignore_missing: true
5162
- rename:
63+
tag: rename_aws_apigateway_connectionId_to_aws_apigateway_connection_id_6f806acf
5264
field: aws.apigateway.connectionId
5365
target_field: aws.apigateway.connection_id
5466
ignore_missing: true
5567
- rename:
68+
tag: rename_aws_apigateway_eventType_to_aws_apigateway_event_type_2a463e2f
5669
field: aws.apigateway.eventType
5770
target_field: aws.apigateway.event_type
5871
ignore_missing: true
5972
- rename:
73+
tag: rename_aws_apigateway_apiId_to_aws_apigateway_api_id_1b4980ad
6074
field: aws.apigateway.apiId
6175
target_field: aws.apigateway.api_id
6276
ignore_missing: true
6377
- rename:
78+
tag: rename_aws_apigateway_domainName_to_aws_apigateway_domain_name_732b5853
6479
field: aws.apigateway.domainName
6580
target_field: aws.apigateway.domain_name
6681
ignore_missing: true
6782
- grok:
83+
tag: grok_aws_apigateway_ip_address_e6f24967
6884
field: aws.apigateway.ip_address
6985
patterns:
7086
- '%{IPORHOST:aws.apigateway.ip_address}'
7187
ignore_failure: true
7288
- convert:
89+
tag: convert_aws_apigateway_ip_address_10d88955
7390
field: aws.apigateway.ip_address
7491
type: ip
7592
ignore_missing: true
7693
- convert:
94+
tag: convert_aws_apigateway_response_length_de377d20
7795
field: aws.apigateway.response_length
7896
type: long
7997
ignore_missing: true
8098
- convert:
99+
tag: convert_aws_apigateway_status_28a91148
81100
field: aws.apigateway.status
82101
type: long
83102
ignore_missing: true
84103
- date:
104+
tag: date_aws_apigateway_request_time_to_aws_apigateway_request_time_6995b9b1
85105
field: aws.apigateway.request_time
86106
target_field: "aws.apigateway.request_time"
87107
formats:
@@ -96,4 +116,4 @@ on_failure:
96116
value: >-
97117
Processor '{{{ _ingest.on_failure_processor_type }}}'
98118
{{{#_ingest.on_failure_processor_tag}}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
99-
{{{/_ingest.on_failure_processor_tag}}}failed with message '{{{ _ingest.on_failure_message }}}'
119+
{{{/_ingest.on_failure_processor_tag}}}in pipeline '{{{ _ingest.pipeline }}}' failed with message '{{{ _ingest.on_failure_message }}}'

packages/aws/data_stream/awshealth/elasticsearch/ingest_pipeline/default.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
description: Pipeline for AWS Health metrics
33
processors:
44
- script:
5+
tag: script_aad5131d
56
if: "ctx.aws != null && ctx.aws.awshealth != null && ctx.aws.awshealth.end_time == '0001-01-01T00:00:00.000Z'"
67
"lang": "painless"
78
"source": "ctx.aws.awshealth.end_time = null"
89

910
- script:
11+
tag: script_7a0bd239
1012
lang: painless
1113
source: |-
1214
boolean drop(Object o) {
@@ -33,4 +35,4 @@ on_failure:
3335
value: >-
3436
Processor '{{{ _ingest.on_failure_processor_type }}}'
3537
{{{#_ingest.on_failure_processor_tag}}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
36-
{{{/_ingest.on_failure_processor_tag}}}failed with message '{{{ _ingest.on_failure_message }}}'
38+
{{{/_ingest.on_failure_processor_tag}}}in pipeline '{{{ _ingest.pipeline }}}' failed with message '{{{ _ingest.on_failure_message }}}'

packages/aws/data_stream/billing/elasticsearch/ingest_pipeline/default.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,17 @@
22
description: "Pipeline for AWS Billing"
33
processors:
44
- dot_expander:
5+
tag: dot_expander_*_c2762c23
56
field: "*"
67
ignore_failure: true
78
- set:
9+
tag: set_cloud_account_name_20733914
810
field: cloud.account.name
911
copy_from: cloud.account.id
1012
override: false
1113
ignore_empty_value: true
1214
- fingerprint:
15+
tag: fingerprint_deb4df05
1316
fields: ["aws.billing.group_by"]
1417
target_field: 'aws.billing.group_by.fingerprint'
1518
ignore_missing: true
@@ -22,4 +25,4 @@ on_failure:
2225
value: >-
2326
Processor '{{{ _ingest.on_failure_processor_type }}}'
2427
{{{#_ingest.on_failure_processor_tag}}}with tag '{{{ _ingest.on_failure_processor_tag }}}'
25-
{{{/_ingest.on_failure_processor_tag}}}failed with message '{{{ _ingest.on_failure_message }}}'
28+
{{{/_ingest.on_failure_processor_tag}}}in pipeline '{{{ _ingest.pipeline }}}' failed with message '{{{ _ingest.on_failure_message }}}'

0 commit comments

Comments
 (0)