문제

I'm working on multitenant application which create MySQL RDS-based databases for tenants. There are many of those databases can be created per one RDS DB instance - they are pretty small and minimum size of the DB instance is 5GB.

To provide usage stats on per-tenant basis I'm going to collect CloudWatch metrics (such as DatabaseConnections, ReadIOPS etc) for each of the tenants' DBs.

The problem is that I can't figure out how to get DB-wide stats. It seems that CloudWatch API provide metrics for DB instance level only, not for specific databases.

Is there any way to get those stats? Or may be some kind of workaround available? I will be glad to hear any advices.

올바른 솔루션이 없습니다

다른 팁

What i understand is you want to implement "Custom Metrics" for cloudwatch. Here is a flow that you may implement. I got my hands on for the same and its working cool ( tried with df -h command for understanding disk usage for each partitions of my aws instance)

  1. connect to ec2 service using amazon api (restful is fine)

  2. get each instance, and find their IPs( either blanket or filter out from the available list later.)

  3. use the security key (pem file) to make ssh connection with IP from step 2 (assumed its running DB)

  4. use remote command (using ssh) to get your custom metrics.

  5. format the output of the above step, and push it to cloudwatch.

  6. repeat step 4,5 periodically to get a custom metric functional.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top