Skip to content

Commit

Permalink
[7.16](backport #29106) Fix rds metadata in cloudwatch metricset (#29129
Browse files Browse the repository at this point in the history
)

* Fix rds metadata in cloudwatch metricset (#29106)

(cherry picked from commit 5594923)

* Update CHANGELOG.next.asciidoc

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
  • Loading branch information
mergify[bot] and kaiyan-sheng committed Nov 24, 2021
1 parent 8f9d9e8 commit d490c1c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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*

Expand Down
3 changes: 2 additions & 1 deletion x-pack/metricbeat/module/aws/cloudwatch/metadata/rds/rds.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit d490c1c

Please sign in to comment.