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

Cherry-pick #15640 to 7.6: [Metricbeat] Update KQL to get estimated cost without dimension ServiceName #15660

Merged
merged 1 commit into from
Jan 20, 2020
Merged

Conversation

kaiyan-sheng
Copy link
Contributor

Cherry-pick of PR #15640 to 7.6 branch. Original message:

What does this PR do?

This PR is to fix Total Estimated Cost visualization for billing metricset in aws module.

Why is it important?

In Total Estimated Cost visulization, aws.dimensions.ServiceName : * query of Total Estimated Charges is wrong. It's returning total charges with any service name instead of returning total charges from all service names. Total charges from all service name does not have a ServiceName as dimension. So the KQL should be not aws.dimensions.ServiceName : * instead.

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

How to test this PR locally

Download this PR locally and build metricbeat with mage update; mage build.
Enable aws module: ./metricbeat modules enable aws
Load dashboards: ./metricbeat setup --dashboards -E setup.dashboards.directory=build/kibana
Change metricbeat aws.yml to:

- module: aws
  period: 12h
  credential_profile_name: elastic-beats
  metricsets:
    - billing
  regions:
    - us-east-1

Start Metricbeat: ./metricbeat -e
Make sure you have billing metrics show up in ES before checking the dashboard.

Related issues

Screenshots

Screen Shot 2020-01-17 at 8 33 25 AM

From this screenshot you can see the metric value without ServiceName is $7.74, which matches the value showed in the screenshot below:
Screen Shot 2020-01-17 at 8 32 49 AM

@kaiyan-sheng kaiyan-sheng merged commit 3cae036 into elastic:7.6 Jan 20, 2020
@kaiyan-sheng kaiyan-sheng deleted the backport_15640_7.6 branch January 20, 2020 14:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants