Is your feature request related to a problem? If yes, please describe.
CloudWatch supports the sharing of metrics via the Observability Access Manager API. This enables a monitoring account to view metrics from other accounts. To support this, the ListMetrics API call must include the IncludeLinkedAccounts parameter set to true. Additionally, the response includes an OwningAccounts array which corresponding to the owning accounts of the metrics listed.
I was able to include the shared metrics by changing this line to ListMetricsRequest listMetricsRequest = new ListMetricsRequest().withIncludeLinkedAccounts(true); however I'm not sure where this parameter should be set. Additionally, the output doesn't include the owning account.
Describe the solution you'd like
Make the IncludeLinkedAccounts parameter configurable and ideally include the owning account in the output.
Describe alternatives you've considered
N/A. AWS Support has suggested creating an Athena data source in each account but with hundreds of accounts this is not feasible as data sources are not supported by CloudFormation.
I've implemented this in my own clone. Feel free to use it. We're actively using it for a QuickSight dashboard and it seems to work for us, but I can't guarantee it's bug free. I'll clean it up, add unit tests, and open a PR when I have the time.
Is your feature request related to a problem? If yes, please describe. CloudWatch supports the sharing of metrics via the Observability Access Manager API. This enables a monitoring account to view metrics from other accounts. To support this, the
ListMetrics
API call must include theIncludeLinkedAccounts
parameter set to true. Additionally, the response includes anOwningAccounts
array which corresponding to the owning accounts of the metrics listed. I was able to include the shared metrics by changing this line toListMetricsRequest listMetricsRequest = new ListMetricsRequest().withIncludeLinkedAccounts(true);
however I'm not sure where this parameter should be set. Additionally, the output doesn't include the owning account.Describe the solution you'd like Make the
IncludeLinkedAccounts
parameter configurable and ideally include the owning account in the output.Describe alternatives you've considered N/A. AWS Support has suggested creating an Athena data source in each account but with hundreds of accounts this is not feasible as data sources are not supported by CloudFormation.