costBuddy
costBuddy copied to clipboard
All panels are not aggregated with multi-account configuration
Describe the bug AWS Service Monthly Cost Spend dashboard panel & all other default panels after deployment are not aggregated with multi-account configuration, displays service spend legend per account.
To Reproduce Steps to reproduce the behavior. For example:
- Configure multiaccount according to the steps in the Readme.
- Launch Grafana UI.
Expected behavior AWS Service Monthly Cost Spend (and other panels) will display the data aggregated by AWS service name, legend per service name that aggregates all information from all accounts, and not legend per service per account.
Screenshots
Desktop (please complete the following information):
- OS: MacOS
- Browser: Chrome
- Version: Not applicable
Fix: Alter the query from:
sum(ce_aws_service_monthly_spend{account_id=~'$account_id', month='$month', year='$year'}) by (aws_service, account_id) - (sum(ce_aws_service_monthly_spend{account_id=~'$account_id', year='$year', month='$month'}) by (aws_service, account_id)/100 * $discount)
to:
sum(ce_aws_service_monthly_spend{account_id=~'$account_id', month='$month', year='$year'}) by (aws_service) - (sum(ce_aws_service_monthly_spend{account_id=~'$account_id', year='$year', month='$month'}) by (aws_service)/100 * $discount)
I created PR #11 to handle this
Thanks @avishayil , We will review the PR.