diff --git a/plugins/inputs/cloudwatch/cloudwatch.go b/plugins/inputs/cloudwatch/cloudwatch.go index 86bdbd9849383..12fceac611c02 100644 --- a/plugins/inputs/cloudwatch/cloudwatch.go +++ b/plugins/inputs/cloudwatch/cloudwatch.go @@ -262,6 +262,10 @@ func getFilteredMetrics(c *CloudWatch) ([]filteredMetric, error) { }) } } + if c.IncludeLinkedAccounts { + _, allAccounts := c.fetchNamespaceMetrics() + accounts = append(accounts, allAccounts...) + } } else { allMetrics, allAccounts := c.fetchNamespaceMetrics()