diff --git a/CHANGELOG.next.asciidoc b/CHANGELOG.next.asciidoc index 0c32d05aa6ea..4fd0e102ebda 100644 --- a/CHANGELOG.next.asciidoc +++ b/CHANGELOG.next.asciidoc @@ -212,6 +212,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d - Groups same timestamp metric values to one event in the app_insights metricset. {pull}20403[20403] - `beat` module respects `basepath` config option. {pull}28162[28162] - Fix list_docker.go {pull}28374[28374] +- Fix rds metadata in cloudwatch metricset. {pull}29106[29106] *Packetbeat* diff --git a/x-pack/metricbeat/module/aws/cloudwatch/metadata/rds/rds.go b/x-pack/metricbeat/module/aws/cloudwatch/metadata/rds/rds.go index c74234af7ce9..e732749d0162 100644 --- a/x-pack/metricbeat/module/aws/cloudwatch/metadata/rds/rds.go +++ b/x-pack/metricbeat/module/aws/cloudwatch/metadata/rds/rds.go @@ -87,7 +87,8 @@ func getDBInstancesPerRegion(svc rdsiface.ClientAPI) (map[string]*rds.DBInstance instancesOutputs := map[string]*rds.DBInstance{} for _, dbInstance := range output.DBInstances { - instancesOutputs[*dbInstance.DBInstanceIdentifier] = &dbInstance + instance := dbInstance + instancesOutputs[*instance.DBInstanceIdentifier] = &instance } return instancesOutputs, nil }