Skip to content

Commit 6e40c68

Browse files
committed
feat: Add database engine type to RDS multitenant collector
- Add engine field to collected metrics data - Update process_metrics function to accept engine parameter - Include engine column in Athena view for filtering and analysis - Enable cost allocation analysis by database engine type
1 parent 6a42bb1 commit 6e40c68

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

data-collection/deploy/module-rds-multitenant.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Resources:
204204
205205
# Collect metrics for this instance
206206
region_metrics[region].extend(
207-
process_metrics(instance_id, instance_arn, metrics, region)
207+
process_metrics(instance_id, instance_arn, metrics, region, engine)
208208
)
209209
else:
210210
print(f"Performance Insights not enabled for instance {instance_id} in {region}")
@@ -280,7 +280,7 @@ Resources:
280280
return response['MetricList']
281281
282282
283-
def process_metrics(instance_id, instance_arn, metrics, region):
283+
def process_metrics(instance_id, instance_arn, metrics, region, engine):
284284
all_flattened_metrics = []
285285
num_cpus = ''
286286
@@ -312,6 +312,7 @@ Resources:
312312
"metric": metric["Key"]["Metric"],
313313
"resourcearn": instance_arn,
314314
"instance_id": instance_id,
315+
"engine": engine,
315316
"num_vcpus": num_cpus,
316317
"dimension_type": dimension_type,
317318
"db_user_name": dimensions.get('db.user.name', None),
@@ -572,6 +573,7 @@ Resources:
572573
b.timestamp,
573574
b.account_id,
574575
b.resourcearn,
576+
b.engine,
575577
b.num_vcpus,
576578
b.dimension_type,
577579
CASE WHEN b.dimension_type = 'user' THEN b.db_user_name END as user_name,

0 commit comments

Comments
 (0)