Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[8.x](backport #40691) [AWS] Support owning account for cross account monitoring #40860

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

mergify[bot]
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 <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 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
Collaborator

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
29 checks passed
@Kavindu-Dodan Kavindu-Dodan deleted the mergify/bp/8.x/pr-40691 branch September 17, 2024 16:32
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.

2 participants