-
Notifications
You must be signed in to change notification settings - Fork 13
/
exporter_config.yaml
58 lines (54 loc) · 2.84 KB
/
exporter_config.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
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
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
# Allowed values for metric type are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity
metric_type: AmortizedCost
- metric_name: aws_daily_cost_usd # change the metric name if needed
group_by:
# 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
# Allowed values for metric type are AmortizedCost, BlendedCost, NetAmortizedCost, NetUnblendedCost, NormalizedUsageAmount, UnblendedCost, and UsageQuantity
metric_type: AmortizedCost
target_aws_accounts:
# here defines a list of target AWS accounts
# it should be guaranteed that all the AWS accounts have the same set of keys (in this example they are Publisher, ProjectName, and EnvironmentName)
- Publisher: 234567890123
ProjectName: dev-team-1
EnvironmentName: dev
- Publisher: 321645789123
ProjectName: dev-team-2
EnvironmentName: dev