Skip to content

Conversation

@mergify
Copy link
Contributor

@mergify mergify bot commented Sep 17, 2024

Proposed commit message

Adds owning_account configuration option for AWS where it accepts a source account ID. Internally, this maps to the ListMetrics API's 1 OwningAccount parameter. Note that include_linked_accounts should be set to true to use the account filtering.

include_linked_accounts: true # default to true, hence can be ignored in configuration yaml
owning_account: 111111111111

See the screenshot below from an actual run with owning account filtering,

Screenshot 2024-09-09 at 10 26 11 AM

In comparison, consider the screenshot below where both monitoring account and linked accounts are visible as there is no filtering for owning_account,

Screenshot 2024-09-10 at 9 48 42 AM

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

None :owning_account is a new configuration

How to test this PR locally

  • Build x-pack metricsbeat
  • Enable AWS monitoring with include_linked_accounts set to true (default is already true) & owning_account account ID
  • Observe metrics data and validate that cloud.account.id match with owning_account ID

Related issues

Closes #40570


This is an automatic backport of pull request #40691 done by [Mergify](https://mergify.com).

Footnotes

  1. https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_ListMetrics.html#API_ListMetrics_RequestParameters

* support OwniningAccount filtering

Signed-off-by: Kavindu Dodanduwa <[email protected]>

* document the new paramter

Signed-off-by: Kavindu Dodanduwa <[email protected]>

* add changelog

Signed-off-by: Kavindu Dodanduwa <[email protected]>

* Update CHANGELOG.next.asciidoc

Co-authored-by: kaiyan-sheng <[email protected]>

* Update x-pack/metricbeat/modules.d/aws.yml.disabled

Co-authored-by: kaiyan-sheng <[email protected]>

* add missing docuemntation of owning_account parameter

Signed-off-by: Kavindu Dodanduwa <[email protected]>

---------

Signed-off-by: Kavindu Dodanduwa <[email protected]>
Co-authored-by: kaiyan-sheng <[email protected]>
(cherry picked from commit 03e7699)
@mergify mergify bot requested review from a team as code owners September 17, 2024 15:07
@mergify mergify bot added the backport label Sep 17, 2024
@mergify mergify bot requested review from AndersonQ and khushijain21 and removed request for a team September 17, 2024 15:07
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Sep 17, 2024
@Kavindu-Dodan Kavindu-Dodan added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Sep 17, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Sep 17, 2024
@Kavindu-Dodan Kavindu-Dodan merged commit a620016 into 8.x Sep 17, 2024
@Kavindu-Dodan Kavindu-Dodan deleted the mergify/bp/8.x/pr-40691 branch September 17, 2024 16:32
@khushijain21 khushijain21 mentioned this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport Team:obs-ds-hosted-services Label for the Observability Hosted Services team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants