Cherry-pick #15640 to 7.6: [Metricbeat] Update KQL to get estimated cost without dimension ServiceName #15660
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 benot aws.dimensions.ServiceName : *
instead.Checklist
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:
Start Metricbeat:
./metricbeat -e
Make sure you have billing metrics show up in ES before checking the dashboard.
Related issues
Screenshots
From this screenshot you can see the metric value without ServiceName is $7.74, which matches the value showed in the screenshot below: