Opsgenie: integration with AWS RDS and alerting

By | 03/18/2021
 

Let’s configure Opsgenie with AWS RDS.

The idea is to get notifications from RDS about events and send them to Opsgenie which will send them to our Slack.

To do so, we need to configure AWS Simple Notification Service and AWS RDS Event subscriptions.

The official documentation is here>>>.

Opsgenie confiuration

Go to the Integrations list, find AWS RDS, activate it:

Save the URL from the “Add an HTTPS subscription” field and go to your AWS account.

AWS configuration

Create an AWS SNS

Documentation is here>>>.

Go to the AWS SNS, create a new topic with the Standart type:

Click on the Create subscription:

Create a subscription with the HTTPS type, in the Endpoint specify the URL from the Opsgenie created during AWS RDS integration activation:

In the Opsgenie Alerts you must get a test notification:

Save, and go to the RDS.

RDS Event subscription configuration

Documentaion is here>>>.

Here you must decide about events are you interested in to get notification about, see the list on the Amazon RDS event categories and event messages page.

Also, you can check events that already happen in the Events.

For example, let’s get notified about Instance: availability, creation, failover, failure, maintenance, notification, read replica, recovery.

Click on the Create event subscription:

Configure fields:

Save it.

To check if everything is working – reboot an instance:

Check the RDS Events:

And Opsgenie Alerts:

Advanced setup

In the Opsgenie Integration, you can click on the Advanced for an additional configuration.

For example, here you can set a rule if the sourceId field includes a “prod” string  – then an alert must be created with the Critical priority:

And in our team configuration, Critical alerts will be sent not only to Slack but also an Opsgenie bot will call an engineer.

Done.