Elastic APM Integration Guide
Elastic APM is an application performance monitoring system built on the Elastic Stack. It allows one to monitor software services and applications in real-time, by collecting detailed performance information on response time for incoming requests, database queries, calls to caches, external HTTP requests, and more.
With the Zenduty-Elastic APM integration, you will be able to create new Incidents/Alerts in Zenduty whenever any rule in Elastic APM is breached/violated.
You can also use Alert Rules to custom route specific Elastic APM alerts to specific users, teams or escalation policies, write suppression rules, auto add notes, responders and incident tasks.
To integrate Elastic APM with Zenduty, complete the following steps:
In Zenduty:
-
To add a new Elastic APM integration, go to Teams on Zenduty and click on the team you want to add the integration to.
-
Next, go to Services and click on the relevant Service.
-
Go to Integrations and then Add New Integration. Give it a name and select the application Elastic APM from the dropdown menu.
-
Go to Configure under your integrations and Copy the generated Webhook URL.
In Elastic APM:
-
Log into Elastic, and launch the APM application.
-
Click the Sidebar which opens up the navigation and navigate to Stack Management under Management.
-
Now under Alerts and Insights tab, navigate to Alerts and Actions".
-
Then select the Connectors tab and Create a new Connector by clicking the Create Connector button.
-
Proceed by creating a Webhook connector.
-
Paste the previously copied URL and set the method to POST. Also set a suitable name for the Webhook Connector & Save the Connector.
-
Proceed by creating alerts which has the Webhook action, and then choose the Webhook Connector that was made earlier.
-
One can get fields for creating the threshold Alerts by creating alerts from a specific APM service itself.
-
For the body of the Alert being sent,
a JSON object should be sent that is having the fields :- title
- id (This would be considered the entityId.)
- description
- status (If the status is set to "Breached" or "Triggered" -> It would create a Critical Alert.)
Status Alert Type "Breached","Triggered" Critical "Pending" Acknowledged "Solved","Controlled","Resolved" Resolved An example body would be :
{
"title":"[ElasticAPM] - {{alertName}}",
"id":"{{alertId}}",
"description":"The alert '{{alertName}}' was triggered when the threshold of '{{context.threshold}}' was breached with the value : '{{context.triggerValue}}' ",
"service":"{{context.serviceName}}",
"length":"{{context.interval}}",
"status":"Breached"
}
-
Proceed to create the Alert.
-
Elastic APM is now integrated with Zenduty.