How to configure multiple RDS instance (100+) alerts in cloud watch for CPU utilization, Free Storage space etc?

0

I have more than 100+ RDS instances, I want to configure alerts like high CPU Utilization, low storage space, etc at once and those alerts should be received in PagerDuty.And those alerts in PagerDuty should show the name of the instance who has high CPU Utilization, low storage space or anything. How to do this?

2개 답변
1

We have done exactly this using terraform for instances created or not created via terraform. We also use terraform to perform the configuration of all of our pager duty environment.

The best you can do is script alarm creation by looping through each RDS instance and then create each alarm while naming each alarm accordingly.

The alarm action should be to sent to SNS topic. Of which PagerDuty is subscribed via https

I would write a bash script or use IAC and loop through each instance and create the alarm.

Write it once over perhaps 5-10 lines of code for this to create all your alarms.

The SNS payload is sent to the PagerDuty service where the details of which instance triggered the alarm is visible in the incident.

profile picture
전문가
답변함 8달 전
profile picture
전문가
검토됨 8달 전
0

Is it a one-off or are you creating new RDS instances regularly?

As a one-off, you could simply loop on existing metrics in the RDS namespace and create alarms on them. You could do that from the CLI or a Lambda, using the list metrics API to listmetrics in the RDS namespace and putmetricalarm to create the alarms.

If you create RDS instances regularly:

  • if you create them from infrastructure as code, e.g. Terraform or CloudFormation, is there a reason that prevents you from creating the alarms from the same stacks?
  • if you don't control the creation, you can listen to events that indicate new RDS instances creation and trigger a lambda on those events, implement the alarm creation in the lambda
profile pictureAWS
Jsc
답변함 8달 전
  • it's one off, and i'm going to keep them. Can you elaborate each step in detail?cause i do not find any option to select all instance at same time....I did create an alarm but its notification did not mention the name of the instance who had shoot its CPU high

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠