Skip to content

[8.15](backport #40691) [AWS] Support owning account for cross account monitoring#40864

Merged
Kavindu-Dodan merged 2 commits into8.15from
mergify/bp/8.15/pr-40691
Sep 17, 2024
Merged

[8.15](backport #40691) [AWS] Support owning account for cross account monitoring#40864
Kavindu-Dodan merged 2 commits into8.15from
mergify/bp/8.15/pr-40691

Conversation

@mergify
Copy link
Copy Markdown
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 <kavindu.dodanduwa@elastic.co>

* document the new paramter

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>

* add changelog

Signed-off-by: Kavindu Dodanduwa <kavindu.dodanduwa@elastic.co>

* Update CHANGELOG.next.asciidoc

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>

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

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>

* add missing docuemntation of owning_account parameter

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>
(cherry picked from commit 03e7699)
@mergify mergify Bot requested a review from a team as a code owner September 17, 2024 15:42
@mergify mergify Bot added the backport label Sep 17, 2024
@mergify mergify Bot requested a review from a team as a code owner September 17, 2024 15:42
@mergify mergify Bot removed the request for review from a team September 17, 2024 15:42
@mergify mergify Bot requested review from faec and khushijain21 September 17, 2024 15:42
@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 Team:obs-ds-hosted-services Label for the Observability Hosted Services team and removed needs_team Indicates that the issue/PR needs a Team:* label labels Sep 17, 2024
@elasticmachine
Copy link
Copy Markdown
Contributor

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

Comment thread CHANGELOG.next.asciidoc
Copy link
Copy Markdown
Contributor

@Kavindu-Dodan Kavindu-Dodan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge pending on the build outcome. Lint failure is not relevant to this PR.

@Kavindu-Dodan Kavindu-Dodan merged commit 16c6d9c into 8.15 Sep 17, 2024
@Kavindu-Dodan Kavindu-Dodan deleted the mergify/bp/8.15/pr-40691 branch September 17, 2024 16:49
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