fix(inputs.cloudwatch): Add accounts when enabled (#15440)

This commit is contained in:
Joshua Powers 2024-06-03 13:52:10 -06:00 committed by GitHub
parent 0a7aa308c8
commit 9eeb4a845b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 0 deletions

View File

@ -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()