Amazon DevOps Guru for the Serverless applications - Part 8 Integrations
Tags: aws, serverless, devops, aiops
Published: 2023-12-26 12:39:11

## Introduction
Starting from the [1st part of the series](https://dev.to/aws-builders/amazon-devops-guru-for-the-serverless-applications-part-1-introduction-to-devops-guru-39i0) we introduced the Amazon DevOps Guru service, described its value proposition, the benefits of using it and explain how to configure it. We also need to go through all the steps in the [2nd part of the series]( https://dev.to/aws-builders/amazon-devops-guru-for-the-serverless-applications-part-2-setting-up-the-sample-application-for-the-anomaly-detection-167) to set everything up. In the subsequent parts we saw DevOps Guru in action detecting anomalies on DynamoDB, API Gateway and Lambda (also in conjunction with other AWS services like SQS, Kinesis, Step Functions and RDS). These all have been so called DevOps Guru “Reactive Insights” detecting live anomalies. DevOps Guru also supports “Reactive Insights” which we introduced in the [part 7](https://dev.to/aws-builders/amazon-devops-guru-for-the-serverless-applications-part-7-proactive-insights-3jfa) of the series. In this part we’ll take a  look at the capabilities of the DevOps Guru in terms of the integrations.

## DevOps Guru Integrations overview
DevOps Guru itself only detects anomalies but doesn’t send emails, SMSs or make a call to inform us about those anomalies. This is the job of other service and (3rd) party incident management tools DevOps Guru provides integration with.  Let’s look into them.

If we navigate into DevOps Guru “Settings” first, we see that we can setup SNS notifications. With that we can create SNS topics which we can connect to all AWS Services that support its integrations like SQS or directly send an email to the defined address, send SMS to the defined phone number or make an outside API call via HTTPS.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dvbqy1v140dz8hk687aa.png)

More on that later.

Next integration possibility of the DevOps Guru is with AWS Systems Manager by "enabling DevOps Guru to create an OpsItem ins OpsCenter for each insight" in the "Settings" pages.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0c1ebx6ldxytcgr5mh5i.png)

With that for each DevOps Guru insight the link to the OpsItem ID will be provided.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/wewqlbzmm3q5j435wum5.png)


AWS Systems Manager OpsCenter overview looks like this.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/m4kkvkgzvbedclv1f51m.png)

We can then navigate to the OpsItems view which looks similar to DevOps Guru insight's view.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w0s1s4uh2wxl0txkfplr.png)

Integration into the AWS Systems Manager OpsCenter alone is not enough. We need to configure the integration into AWS own Incident Manager which is also a part of AWS Systems Manager.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/erdxczxfdob778uolj6k.png)

AWS Incident Manager provides the capability to define the (incident) response plans.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w80zdru7dbwioitbni2y.png)

and (incident) escalations plans.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vu7aiyzyd4bs4635lzqd.png)

Within the escalation plan we can assign previously defined contacts.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0kk8hzgxpzs6ld9prp0c.png)

And within the contacts we can define the contact details themselves, contact channel like phone call, SMS or email and also engagement plan.  You can read more about the feature of the [AWS Incident Manager](https://aws.amazon.com/de/systems-manager/features/incident-manager/).

AWS also provides integrations to the 3rd party incident management tools like Atlassian Opsgenie and PagerDuty. Here is a very detailed article about how to integrate DevOps Guru with [Atlassian Opsgenie](https://aws.amazon.com/de/blogs/devops/deliver-operational-insights-to-atlassian-opsgenie-using-devops-guru/).


We'll now take a look on how to integrate DevOps Guru with the [PagerDuty](https://www.pagerduty.com/). In the PagerDuty under https://${YourAccountAlias}.pagerduty.com/service-directory you can search for and select Amazon DevOps Guru integration. 

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0udjc6rd8l3fzpeceqfb.png)

During the setup PagerDuty generates "Integration Key" and "Integration URL" for us.  


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/fz65gzmvwurvdk5u95kn.png)

Then we go back to DevOps Guru "Settings" and create SNS topic.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/yplpcgi93ckcjkw82kb8.png)

When setting up SNS topic we select HTTPS as a protocol and put the "Integration URL" generated by PagerDuty as a SNS endpoint.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwz23vxq444rqri8uvlt.png)

From now on each insight DevOps Guru will send the message via SNS to the PagerDuty which will provide the similar insight overview as DevOps Guru does but mixing the reactive and proactive insights in the same PagerDuty view as PagerDuty obviously can't differentiate between different insight types created by DevOps Guru.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lglrnzp5st5fwuizdomf.png)

By selecting the incident and clicking on "SHOW DETAILS" we'll see the whole JSON payload DevOps Guru sent to the PagerDuty including anomaly name, severity, starting and closing time and deviating CloudWatch metrics.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z8vwsd071m9pvxfetja0.png)

Of course, with the PagerDuty you can set up professional incident management by assigning the incident to the contact(s) having the on-call duty according to the plan and defining the proper escalation policy. But of course, the purpose of this with PagerDuty is to have a proper incident management integration. For more details about the incident itself I'd recommend jumping to the DevOps Guru Insights pages and view all the graphs and related events provided by this AWS service.


## Conclusion
In this part of the series part of the series we looked at the DevOps Guru capabilities in terms of the integrations, like SNS but also into other solutions like the incident management tools or services as AWS own OpsCenter but also into eternal solutions like Atlassian Opsgenie and PagerDuty with the more detailed example how to use the latter.  In the next part of the series, we’ll take a look into what AWS services DevOps Guru supports and at DevOps Guru pricing.