Skip to content

Commit

Permalink
Fix rds metadata in cloudwatch metricset (#29106) (#29130)
Browse files Browse the repository at this point in the history
(cherry picked from commit 5594923)

Co-authored-by: kaiyan-sheng <kaiyan.sheng@elastic.co>
  • Loading branch information
mergify[bot] and kaiyan-sheng committed Nov 24, 2021
1 parent 6b4dc96 commit dd47e88
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 @@ -244,6 +244,7 @@ https://github.com/elastic/beats/compare/v7.0.0-alpha2...master[Check the HEAD d
- `beat` module respects `basepath` config option. {pull}28162[28162]
- Fix list_docker.go {pull}28374[28374]
- Fix in rename processor to ingest metrics for `write.iops` to proper field instead of `write_iops` in rds metricset. {pull}28960[28960]
- 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 dd47e88

Please sign in to comment.