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

Change disk and network metrics to use Sum statistic method #20680

Merged
merged 8 commits into from
Aug 21, 2020
Merged

Change disk and network metrics to use Sum statistic method #20680

merged 8 commits into from
Aug 21, 2020

Conversation

kaiyan-sheng
Copy link
Contributor

@kaiyan-sheng kaiyan-sheng commented Aug 19, 2020

What does this PR do?

This PR is to change disk and network metrics from Average to Sum statistic method. This way, the values are total in the collection period, not an average. For host inventory schema work, we identified several common host metrics and for disk and network, these metrics should be gauges, which is the total value in a period of time.

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.

How to test this PR locally

  1. Enable aws module and change aws.yml to:
- module: aws
  period: 5m
  credential_profile_name: elastic-beats
  metricsets:
    - ec2
  1. Start Metricbeat

  2. Check metrics in Kibana and compare with CloudWatch portal with Statistic=Sum and Period=5 Minutes:

Screen Shot 2020-08-18 at 6 00 58 PM

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Aug 19, 2020
@kaiyan-sheng kaiyan-sheng self-assigned this Aug 19, 2020
@kaiyan-sheng kaiyan-sheng added needs_backport PR is waiting to be backported to other branches. Team:Platforms Label for the Integrations - Platforms team labels Aug 19, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/integrations-platforms (Team:Platforms)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Aug 19, 2020
@elasticmachine
Copy link
Collaborator

elasticmachine commented Aug 19, 2020

💚 Build Succeeded

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Started by user kaiyan-sheng, Replayed #9]

  • Start Time: 2020-08-21T13:29:17.126+0000

  • Duration: 62 min 43 sec

Test stats 🧪

Test Results
Failed 0
Passed 3550
Skipped 794
Total 4344

@jsoriano jsoriano added test-plan Add this PR to be manual test plan v7.10.0 labels Aug 19, 2020
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

LGTM, there seems to be some linting issues but don't look related to this change 🤔

I have added a couple of questions and suggestions.

x-pack/metricbeat/module/aws/ec2/data.go Show resolved Hide resolved
x-pack/metricbeat/module/aws/ec2/ec2.go Outdated Show resolved Hide resolved
x-pack/metricbeat/module/aws/ec2/ec2.go Outdated Show resolved Hide resolved
x-pack/metricbeat/module/aws/ec2/ec2.go Outdated Show resolved Hide resolved
metricbeat/_meta/fields.common.yml Show resolved Hide resolved
Copy link
Member

@jsoriano jsoriano left a comment

Choose a reason for hiding this comment

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

Thanks for addressing the suggestions! I have added some more nitpicking suggestions 😬 but it LGTM.

x-pack/metricbeat/module/aws/ec2/ec2.go Outdated Show resolved Hide resolved
x-pack/metricbeat/module/aws/ec2/ec2.go Outdated Show resolved Hide resolved
x-pack/metricbeat/module/aws/ec2/ec2.go Outdated Show resolved Hide resolved
@kaiyan-sheng kaiyan-sheng merged commit adeb6f3 into elastic:master Aug 21, 2020
@kaiyan-sheng kaiyan-sheng deleted the host_data_ec2 branch August 21, 2020 14:33
@kaiyan-sheng kaiyan-sheng removed the needs_backport PR is waiting to be backported to other branches. label Aug 21, 2020
kaiyan-sheng added a commit that referenced this pull request Aug 24, 2020
…20737)

* Change disk and network metrics to use Sum statistic method

(cherry picked from commit adeb6f3)
@andresrc andresrc added the test-plan-added This PR has been added to the test plan label Oct 3, 2020
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
…20680)

* Change disk and network metrics to use Sum statistic method
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Team:Platforms Label for the Integrations - Platforms team test-plan Add this PR to be manual test plan test-plan-added This PR has been added to the test plan v7.10.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants