Amazon DevOps Guru Integration
An operational tool that improves application availability using machine learning to analyse resource telemetry to identify potential operational issues and also recommend remediation actions
What does Opsgenie offer DevOps Guru users?
Opsgenie acts as a dispatcher for the insights generated by DevOps Guru, determines the right people to notify based on on-call schedules– notifies them using email, text messages (SMS), phone calls and iPhone & Android push notifications, and escalates alerts until the alert is acknowledged or closed. DevOps Guru generates the isights and Opsgenie ensures the right people are working on them.
Functionality of the integration
- When an insight is generated in DevOps Guru, an alert is created in Opsgenie automatically through the integration, with a priority based on the type and severity of the insight.
- When an insight is resolved in DevOps Guru, related alert is closed in Opsgenie automatically through the integration.
- When an anomaly is added to the insight by DevOps Guru, it is reflected on the Opsgenie alert as a note.
Add DevOps Guru Integration in Opsgenie
- Please create an Opsgenie account if you haven't done so already.
- Go to Opsgenie's DevOps Guru Integration page.
For Free and Essentials plans, you can only add the integrations from the Team Dashboards, please use the alternative instructions given below to add this integration.
- Specify who is notified of DevOps Guru alerts using the Teams field. Autocomplete suggestions are provided as you type.
An alternative for Step 2) and Step 3) is to add the integration from the Team Dashboard of the team which will own the integration. To add an integration directly to a team, navigate to the Team Dashboard and open Integrations tab. Click Add Integration and select the integration that you would like to add.
- Copy the integration URL.
- Click Save Integration.
Configure Opsgenie to receive SNS Messages
- On the Amazon SNS console, choose Topics.
- Choose Create topic.
- For Type, select Standard.
- For name, enter a name, such as
operational-insights
. - Leave the default settings as they are or configure them to suit your needs.
6.Choose Create Topic.
7. After the topic has been created, scroll down to the Subscriptions section and choose Create subscription.
- For Protocol, choose HTTPS.
- For Endpoint, enter the subscription URL you saved earlier. Use the URL provided from Opsgenie's Integration page for DevOps Guru (as shown below).
- Leave the remaining options as the defaults, or configure them to meet your needs.
- Choose Create subscription.
Upon creating the subscription, Amazon SNS sends a confirmation message to your Opsgenie integration, which Opsgenie automatically acknowledges on your behalf. You should see a confirmation alert.
Setting up Amazon DevOps Guru
The first time you browse to the DevOps Guru console, you will need to enable DevOps Guru to operate on your account.
- On the DevOps Guru console, choose Get Started.
If you have already enabled DevOps Guru, you can add your SNS topic by choosing Settings on the DevOps Guru Console, and then skip to step 3.
2.Select the Resources you want to monitor (we chose Analyze all AWS resources in the current AWS account).
- Choose select an existing SNS topic.
- Choose the topic you created earlier (
operational-insights
). - Choose Add SNS topic.
- Choose Enable (or Save if you have already enabled the service).
Sample payload sent from DevOps Guru
Create Alert payload:
{
"Type": "Notification",
"MessageId": "1cf7a0eb-4179-4181-b15b-ea22c5aa0280",
"TopicArn": "arn:aws:sns:us-east-1:089311581210:test-sns",
"Message":"{\"AccountId\":\"123456789012\",\"InsightId\":\"abc123a7-17a3-46d9-b895-1ae38317ced2\",\"InsightDescription\":\"Lambda Errors Anomalous\",\"InsightUrl\":\"https://console.aws.amazon.com/codeguru/devopsguru?#/insight/reactive/ABCDabcdAAAAAAAAAcXzDoJsi_kvAhzmKKUGk6CSixyzABC\",\"Region\":\"us-east-1\",\"InsightSeverity\":\"low\",\"MessageType\":\"NEW_INSIGHT\",\"InsightType\":\"REACTIVE\",\"StartTime\":\"Jan 24th 2010 4:55:123\",\"EndTime\":\"Jan 24th 2010 4:55:123\",\"Anomalies\":[{\"Id\":\"123abcd1-62cb-4161-986c-0be917d42706\",\"StartTime\":\"Jan 24th 2010 2:55:123\",\"EndTime\":\"Jan 24th 2010 3:55:123\",\"DataIdentifiers\":{\"Namespace\":\"AWS/DynamoDB\",\"Metric\":\"ConsumedReadCapacityUnits\",\"stats\":\"Sum\",\"Resources\":[{\"ResourceType\":\"Table\",\"ResourceId\":\"arn:..../tablename\"}]}}],\"Recommendations\":[{\"Title\":\"Configure provisioned concurrency for Lambda\",\"Description\":\"Your Lambda function is having trouble scaling. See this link to learn how to enable provisioned...\",\"Reason\":\"The Duration metric in Lambda breached a high threshold.\",\"Url\":\"https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html#configuration-concurrency-provisioned\",\"RelatedMetrics\":[],\"RelatedEvents\":[]}]}",
"Timestamp": "2012-08-05T22:31:30.673Z",
"SignatureVersion": "1",
"Signature": "XrsO2wtE0b+ofOl1Z85tqLqQn1fMuv07uRttlimTUg+rV4U9RmNSSBEdlmyWvtGgpjebsmNv1wkjUsBQOJZjZnpZp5FBn6quAn3twNdRMmMLf15lv6ESbYF8mpFHwmMhgWVkgq60vmjj/ZLwiH9Pr/cxVYOR0aPQBPDwTYn8w6g=",
"SigningCertURL": "https://sns.us-east-1.amazonaws.com/SimpleNotificationService-f3ecfb7224c7233fe7bb5f59f96de52f.pem",
"UnsubscribeURL": "https://sns.us-east-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-east-1:089311581210:CloudWatchHTTPAlarms:1841c5ca-ddda-450e-bbfb-bf0cf15813db"
}
This payload is parsed by Opsgenie as:
{
"TopicArn": "arn:aws:sns:us-east-1:089311581210:test-sns",
"AccountId": "123456789012",
"InsightId": "abc123a7-17a3-46d9-b895-1ae38317ced2",
"InsightDescription": "Lambda Errors Anomalous",
"InsightUrl": "https://console.aws.amazon.com/codeguru/devopsguru?#/insight/reactive/ABCDabcdAAAAAAAAAcXzDoJsi_kvAhzmKKUGk6CSixyzABC",
"Region": "us-east-1",
"InsightSeverity": "low",
"MessageType": "NEW_INSIGHT",
"InsightType": "REACTIVE",
"StartTime": "Jan 24th 2010 4:55:123",
"EndTime": "Jan 24th 2010 4:55:123",
"AnomalyDetails": [
{
"Id": "AP8fPq2F7cSqdkgAWTkeU2YAAAF1_GN9YIxzoKM_WkDOJim_ozMyiajN5VGZ5zqg",
"StartTime": 1606257180000,
"EndTime": 1606260300000,
"SourceDetails": [
{
"DataSource": "CW_METRICS",
"DataIdentifiers": {
"name": "Duration",
"namespace": "AWS/Lambda",
"period": "60",
"stat": "Average",
"unit": "None",
"dimensions": "{\"FunctionName\": \"awscodestar-random-lambda-GetHelloWorld\"}"
}
}
]
}
],
"Recommendations": [
{
"Title": "Configure provisioned concurrency for Lambda",
"Description": "Your Lambda function is having trouble scaling. See this link to learn how to enable provisioned...",
"Reason": "The Duration metric in Lambda breached a high threshold.",
"Url": "https://docs.aws.amazon.com/lambda/latest/dg/configuration-concurrency.html#configuration-concurrency-provisioned",
"RelatedMetrics": [ ],
"RelatedEvents": [ ]
}
]
}
Insight Type - Severity to Opsgenie Priority Mappings
InsightType | Severity | Priority |
---|---|---|
REACTIVE | high | P1 |
REACTIVE | medium | P3 |
REACTIVE | low | P4 |
PROACTIVE | high | P2 |
PROACTIVE | medium | P4 |
PROACTIVE | low | P5 |
Updated about 4 years ago