Skip to content

Commit 23776ce

Browse files
[AWS] Add support to configure owning account for AWS metrics integrations (#11442)
* introduce owning account for AWS metrics integrations Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> # Conflicts: # packages/aws/changelog.yml * update build docs Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * update compatible beats version Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add missing property to agent Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * accept owning account as a string at agent Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * fix merge conflict and update changelog and version Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * make ownining account conditional Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add ownining account support to aws bedrock Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> # Conflicts: # packages/aws_bedrock/changelog.yml * Update packages/aws/_dev/build/docs/README.md Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co> * Update packages/aws/_dev/build/docs/README.md Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co> * set 0.12.0 version for aws bedrock Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * add newline Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * update build docs Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> * review suggestion - links to aws resources Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> --------- Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co> Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
1 parent d1ac4ef commit 23776ce

File tree

58 files changed

+287
-10
lines changed

Some content is hidden

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

58 files changed

+287
-10
lines changed

packages/aws/_dev/build/docs/README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,11 @@ The extra-charges generated by GetMetricData API calls are proportional to the f
5858
The `include_linked_accounts` parameter is used to enable the inclusion of metrics from different accounts linked to a
5959
main monitoring account. By setting this parameter to true, users can gather metrics from multiple AWS accounts that are
6060
linked through the [CloudWatch cross-account observability](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Unified-Cross-Account.html).
61-
By default, the `include_linked_accounts` parameter is set to false, meaning that only metrics from the main monitoring
62-
account are collected. When set to true, the parameter allows the CloudWatch ListMetrics API to include metrics from
63-
the monitoring account and all linked source accounts in the returned data, providing a comprehensive cross-account view.
61+
Internally, the agent uses [ListMetrics](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html) API to include metrics from the monitoring account and all linked source accounts in the returned data, providing a comprehensive cross-account view.
62+
63+
You can further utilize `owning_account` parameter to refine the cross account observability. This parameter accepts a valid AWS account ID which should be linked to the monitoring account.
64+
If configured, metrics will be extracted from this specified linked/owning account.
65+
This parameter [utilize OwningAccount](https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html#API_ListMetrics_RequestParameters) parameter of the ListMetrics API request.
6466

6567
*_Note_:* Users should ensure that the necessary IAM roles and policies are properly set up in order to link the monitoring
6668
account and source accounts together.

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: "2.30.0"
3+
changes:
4+
- description: Support configuring the Owning Account
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/11442
27
- version: "2.29.0"
38
changes:
49
- description: Add mapping for the service.runtimeDetails fields in GuardDuty events.

packages/aws/data_stream/apigateway_metrics/agent/stream/stream.yml.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ data_granularity: {{data_granularity}}
55
{{/if}}
66
{{#if include_linked_accounts}}
77
include_linked_accounts: {{include_linked_accounts}}
8+
{{#if owning_account}}
9+
owning_account: "{{owning_account}}"
10+
{{/if}}
811
{{/if}}
912
{{#if access_key_id}}
1013
access_key_id: {{access_key_id}}

packages/aws/data_stream/apigateway_metrics/manifest.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ streams:
3939
show_user: false
4040
default: true
4141
description: When include_linked_accounts is set to true, CloudWatch metrics will be collected from both linked accounts and the monitoring account. Default is true.
42+
- name: owning_account
43+
type: integer
44+
title: Owning Account
45+
multi: false
46+
required: false
47+
show_user: false
48+
description: Accepts an AWS account ID linked to the monitoring account. Works only if include_linked_accounts is set to true. If set, monitoring data will only include data from the given account.
4249
- name: tags_filter
4350
type: yaml
4451
title: Tags Filter

packages/aws/data_stream/awshealth/agent/stream/stream.yml.hbs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,9 @@ proxy_url: {{proxy_url}}
3737
processors:
3838
{{processors}}
3939
{{/if}}
40+
{{#if include_linked_accounts}}
41+
include_linked_accounts: {{include_linked_accounts}}
42+
{{#if owning_account}}
43+
owning_account: "{{owning_account}}"
44+
{{/if}}
45+
{{/if}}

packages/aws/data_stream/awshealth/manifest.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,13 @@ streams:
3939
show_user: false
4040
default: true
4141
description: When include_linked_accounts is set to true, CloudWatch metrics will be collected from both linked accounts and the monitoring account. Default is true.
42+
- name: owning_account
43+
type: integer
44+
title: Owning Account
45+
multi: false
46+
required: false
47+
show_user: false
48+
description: Accepts an AWS account ID linked to the monitoring account. Works only if include_linked_accounts is set to true. If set, monitoring data will only include data from the given account.
4249
- name: processors
4350
type: yaml
4451
title: Processors

packages/aws/data_stream/billing/agent/stream/stream.yml.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ data_granularity: {{data_granularity}}
55
{{/if}}
66
{{#if include_linked_accounts}}
77
include_linked_accounts: {{include_linked_accounts}}
8+
{{#if owning_account}}
9+
owning_account: "{{owning_account}}"
10+
{{/if}}
811
{{/if}}
912
{{#if access_key_id}}
1013
access_key_id: {{access_key_id}}

packages/aws/data_stream/billing/manifest.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ streams:
4949
show_user: false
5050
default: true
5151
description: When include_linked_accounts is set to true, CloudWatch metrics will be collected from both linked accounts and the monitoring account. Default is true.
52+
- name: owning_account
53+
type: integer
54+
title: Owning Account
55+
multi: false
56+
required: false
57+
show_user: false
58+
description: Accepts an AWS account ID linked to the monitoring account. Works only if include_linked_accounts is set to true. If set, monitoring data will only include data from the given account.
5259
- name: leaderelection
5360
type: bool
5461
title: Leader Election

packages/aws/data_stream/cloudwatch_metrics/agent/stream/stream.yml.hbs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ data_granularity: {{data_granularity}}
55
{{/if}}
66
{{#if include_linked_accounts}}
77
include_linked_accounts: {{include_linked_accounts}}
8+
{{#if owning_account}}
9+
owning_account: "{{owning_account}}"
10+
{{/if}}
811
{{/if}}
912
{{#if access_key_id}}
1013
access_key_id: {{access_key_id}}

packages/aws/data_stream/cloudwatch_metrics/manifest.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,13 @@ streams:
2727
show_user: false
2828
default: true
2929
description: When include_linked_accounts is set to true, CloudWatch metrics will be collected from both linked accounts and the monitoring account. Default is true.
30+
- name: owning_account
31+
type: integer
32+
title: Owning Account
33+
multi: false
34+
required: false
35+
show_user: false
36+
description: Accepts an AWS account ID linked to the monitoring account. Works only if include_linked_accounts is set to true. If set, monitoring data will only include data from the given account.
3037
- name: regions
3138
type: text
3239
title: Regions

0 commit comments

Comments
 (0)