Skip to content

Commit

Permalink
Update exporter config
Browse files Browse the repository at this point in the history
  • Loading branch information
ylascauxoc committed Sep 17, 2024
1 parent 987a5e6 commit 1177332
Showing 1 changed file with 36 additions and 17 deletions.
53 changes: 36 additions & 17 deletions exporter_config.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 1177332

Please sign in to comment.