diff --git a/exporter_config.yaml b/exporter_config.yaml index e479fa7..e443319 100644 --- a/exporter_config.yaml +++ b/exporter_config.yaml @@ -1,28 +1,47 @@ exporter_port: $EXPORTER_PORT|9090 # the port that exposes cost metrics polling_interval_seconds: $POLLING_INTERVAL_SECONDS|28800 # by default it is 8 hours because for daily cost, AWS only updates the data once per day -metric_name: aws_daily_cost_usd # change the metric name if needed aws_access_key: $AWS_ACCESS_KEY|"" # for prod deployment, DO NOT put the actual value here or default is null ("") to use iam-role/irsa aws_access_secret: $AWS_ACCESS_SECRET|"" # for prod deployment, DO NOT put the actual value here or default is set null ("") to use iam-role/irsa aws_assumed_role_name: example-assumerole -group_by: - enabled: true - # Cost data can be groupped using up to two different groups: DIMENSION, TAG, COST_CATEGORY. - # ref: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetCostAndUsageWithResources.html - # note: label_name should be unique, and different from the labes in target_aws_accounts - groups: - - type: DIMENSION - key: SERVICE - label_name: ServiceName - - type: DIMENSION - key: REGION - label_name: RegionName - merge_minor_cost: - # if this is enabled, minor cost that is below the threshold will be merged into one group +metrics: +- metric_name: aws_daily_cost_by_service_by_account # change the metric name if needed + group_by: + enabled: true + # Cost data can be groupped using up to two different groups: DIMENSION, TAG, COST_CATEGORY. + # ref: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetCostAndUsageWithResources.html + # note: label_name should be unique, and different from the labes in target_aws_accounts + groups: + - type: DIMENSION + key: SERVICE + label_name: ServiceName + - type: DIMENSION + key: LINKED_ACCOUNT + label_name: AccountName + merge_minor_cost: + # if this is enabled, minor cost that is below the threshold will be merged into one group + enabled: false + threshold: 10 + tag_value: other +- metric_name: aws_daily_cost_usd # change the metric name if needed + group_by: enabled: false - threshold: 10 - tag_value: other + # Cost data can be groupped using up to two different groups: DIMENSION, TAG, COST_CATEGORY. + # ref: https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_GetCostAndUsageWithResources.html + # note: label_name should be unique, and different from the labes in target_aws_accounts + groups: + - type: DIMENSION + key: SERVICE + label_name: ServiceName + - type: DIMENSION + key: REGION + label_name: RegionName + merge_minor_cost: + # if this is enabled, minor cost that is below the threshold will be merged into one group + enabled: false + threshold: 10 + tag_value: other target_aws_accounts: # here defines a list of target AWS accounts