Skip to content

Commit

Permalink
[AWSC] Add metrics to RDS enhanced monitoring (#697)
Browse files Browse the repository at this point in the history
* [AWSC] Add metrics to RDS enhanced monitoring

* [AWSC] remove print statement
  • Loading branch information
RaphaelAllier authored Sep 27, 2023
1 parent 89b149a commit 602d2a2
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 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,29 @@ 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:
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 602d2a2

Please sign in to comment.