Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rds metricset cpu.total.pct #28456

Merged
merged 2 commits into from
Oct 18, 2021
Merged

Fix rds metricset cpu.total.pct #28456

merged 2 commits into from
Oct 18, 2021

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Oct 14, 2021

What does this PR do?

This PR is to fix RDS metricset aws.rds.cpu.total.pct by dividing the original value by 100. In the screenshot below, it also shows the value for CPU usage, the ARN are also different collected from different instances.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Related issues

Screenshots

Screen Shot 2021-10-14 at 3 27 29 PM

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 14, 2021
@kaiyan-sheng kaiyan-sheng self-assigned this Oct 14, 2021
@mergify
Copy link
Contributor

mergify bot commented Oct 14, 2021

This pull request does not have a backport label. Could you fix it @kaiyan-sheng? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Oct 14, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 14, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2021-10-18T18:46:38.388+0000

  • Duration: 74 min 18 sec

  • Commit: 8bb67b8

Test stats 🧪

Test Results
Failed 0
Passed 2666
Skipped 248
Total 2914

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

@kaiyan-sheng kaiyan-sheng added backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify Team:Integrations Label for the Integrations team labels Oct 15, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations (Team:Integrations)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 15, 2021
@mergify mergify bot removed the backport-skip Skip notification from the automated backport with mergify label Oct 15, 2021
@@ -43,17 +32,47 @@ func AddMetadata(endpoint string, regionName string, awsConfig awssdk.Config, ev
return events
}

for _, event := range events {
cpuValue, err := event.RootFields.GetValue("aws.rds.metrics.CPUUtilization.avg")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understood correctly, this key gets mapped to aws.rds.cpu.total.pct in the final event. Where does this happen?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review! Im using the rename processor in aws module: https://github.com/elastic/beats/blob/master/x-pack/metricbeat/module/aws/rds/manifest.yml#L85

@kaiyan-sheng kaiyan-sheng merged commit a98cacd into elastic:master Oct 18, 2021
@kaiyan-sheng kaiyan-sheng deleted the rds_bugs branch October 18, 2021 20:03
mergify bot pushed a commit that referenced this pull request Oct 18, 2021
mergify bot pushed a commit that referenced this pull request Oct 18, 2021
kaiyan-sheng added a commit that referenced this pull request Oct 18, 2021
* Fix rds metricset cpu.total.pct (#28456)

(cherry picked from commit a98cacd)

* Update CHANGELOG.next.asciidoc

Co-authored-by: kaiyan-sheng <[email protected]>
kaiyan-sheng added a commit that referenced this pull request Oct 18, 2021
* Fix rds metricset cpu.total.pct (#28456)

(cherry picked from commit a98cacd)

* Update CHANGELOG.next.asciidoc

Co-authored-by: kaiyan-sheng <[email protected]>
Icedroid pushed a commit to Icedroid/beats that referenced this pull request Nov 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.15.0 Automated backport with mergify backport-v7.16.0 Automated backport with mergify Team:Integrations Label for the Integrations team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metricbeat AWS module RDS metricset reports incoherent data
3 participants