Skip to content

Commit

Permalink
[AWSC] Add metrics to RDS enhanced monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelAllier committed Sep 27, 2023
1 parent 89b149a commit 84bf041
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions aws/rds_enhanced_monitoring/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,30 @@ def _process_rds_enhanced_monitoring_message(ts, message, account, region):
host=host_id,
)

for disks_stats in message.get("disks", []):
disks_tag = []
if "name" in disks_stats:
disks_tag.append("%s:%s" % ("name", disks_stats.pop("name")))
for key, value in disks_stats.items():
stats.gauge(
"aws.rds.disks.%s" % key,
value,
timestamp=ts,
tags=tags + disks_tag,
host=host_id,
)

if "system" in message:
print(message["system"])
for key, value in message["system"].items():
stats.gauge(
"aws.rds.system.%s" % key,
value,
timestamp=ts,
tags=tags,
host=host_id,
)


def extract_json_objects(input_string):
"""
Expand Down

0 comments on commit 84bf041

Please sign in to comment.