Skip to content

Commit 602d2a2

Browse files
[AWSC] Add metrics to RDS enhanced monitoring (#697)
* [AWSC] Add metrics to RDS enhanced monitoring * [AWSC] remove print statement
1 parent 89b149a commit 602d2a2

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

aws/rds_enhanced_monitoring/lambda_function.py

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,29 @@ def _process_rds_enhanced_monitoring_message(ts, message, account, region):
228228
host=host_id,
229229
)
230230

231+
for disks_stats in message.get("disks", []):
232+
disks_tag = []
233+
if "name" in disks_stats:
234+
disks_tag.append("%s:%s" % ("name", disks_stats.pop("name")))
235+
for key, value in disks_stats.items():
236+
stats.gauge(
237+
"aws.rds.disks.%s" % key,
238+
value,
239+
timestamp=ts,
240+
tags=tags + disks_tag,
241+
host=host_id,
242+
)
243+
244+
if "system" in message:
245+
for key, value in message["system"].items():
246+
stats.gauge(
247+
"aws.rds.system.%s" % key,
248+
value,
249+
timestamp=ts,
250+
tags=tags,
251+
host=host_id,
252+
)
253+
231254

232255
def extract_json_objects(input_string):
233256
"""

0 commit comments

Comments
 (0)