-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[APM] docs: Add alerting examples for APM #62864
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
| [role="xpack"] | ||
| [[apm-alerts]] | ||
| === Create an alert | ||
|
|
||
| beta::[] | ||
|
|
||
| The APM app is integrated with Kibana's {kibana-ref}/alerting-getting-started.html[alerting and actions] feature. | ||
| It provides a set of built-in **actions** and APM specific threshold **alerts** for you to use, | ||
| and allows all alerts to be centrally managed from <<management,Kibana Management>>. | ||
|
|
||
| [role="screenshot"] | ||
| image::apm/images/apm-alert.png[Create an alert in the APM app] | ||
|
|
||
| There are two different types of threshold alerts: transaction duration, and error rate. | ||
| Below, we'll create one of each. | ||
|
|
||
| [float] | ||
| [[apm-create-transaction-alert]] | ||
| === Create a transaction duration alert | ||
|
|
||
| This guide creates an alert for the `opbeans-java` service based on the following criteria: | ||
|
|
||
| * Transaction type: `transaction.type:request` | ||
| * Average request is above `1500ms` for the last 5 minutes | ||
| * Check every 10 minutes, and repeat the alert every 30 minutes | ||
| * Send the alert via Slack | ||
|
|
||
| From the APM app, navigate to the `opbeans-java` service and select | ||
| **Alerts** > **Create threshold alert** > **Transaction duration**. | ||
|
|
||
| The name of your alert will automatically be set as `Transaction duration | opbeans-java`, | ||
| and the alert will be tagged with `apm` and `service.name:opbeans-java`. | ||
| Feel free to edit either of these defaults. | ||
|
|
||
| Based on the alert criteria, define the following alert details: | ||
|
|
||
| * **Check every** - `10 minutes` | ||
| * **Notify every** - `30 minutes` | ||
| * **TYPE** - `request` | ||
| * **WHEN** - `avg` | ||
| * **IS ABOVE** - `1500ms` | ||
| * **FOR THE LAST** - `5 minutes` | ||
|
|
||
| Select an action type. | ||
| Multiple action types can be selected, but in this example we want to post to a slack channel. | ||
| Select **Slack** > **Create a connector**. | ||
| Enter a name for the connector, | ||
| and paste the webhook URL. | ||
| See Slack's webhook documentation if you need to create one. | ||
|
|
||
| Select **Save**. The alert has been created and is now active! | ||
|
|
||
| [float] | ||
| [[apm-create-error-alert]] | ||
| === Create an error rate alert | ||
|
|
||
| This guide creates an alert for the `opbeans-python` service based on the following criteria: | ||
|
|
||
| * Transaction type: `transaction.type:celery` | ||
| * Error rate is above 25 for the last minute | ||
| * Check every 1 minutes, and repeat the alert every 10 minutes | ||
|
bmorelli25 marked this conversation as resolved.
Outdated
|
||
| * Send the alert via email to the `opbeans-python` team | ||
|
|
||
| From the APM app, navigate to the `opbeans-python` service and select | ||
| **Alerts** > **Create threshold alert** > **Error rate**. | ||
|
|
||
| The name of your alert will automatically be set as `Error rate | opbeans-python`, | ||
| and the alert will be tagged with `apm` and `service.name:opbeans-python`. | ||
| Feel free to edit either of these defaults. | ||
|
|
||
| Based on the alert criteria, define the following alert details: | ||
|
|
||
| * **Check every** - `1 minute` | ||
| * **Notify every** - `10 minutes` | ||
| * **TYPE** - `celery` | ||
|
bmorelli25 marked this conversation as resolved.
Outdated
|
||
| * **IS ABOVE** - `25 errors` | ||
| * **FOR THE LAST** - `1 minute` | ||
|
|
||
| Select the **Email** action type and click **Create a connector**. | ||
| Fill out the required details: sender, host, port, etc., and click **save**. | ||
|
|
||
| Select **Save**. The alert has been created and is now active! | ||
|
|
||
| [float] | ||
| [[apm-alert-manage]] | ||
| === Manage alerts and actions | ||
|
|
||
| From the APM app, select **Alerts** > **View active alerts** to be taken to the Kibana alerts and actions management page. | ||
| From this page, you can create, edit, disable, mute, and delete alerts, and create, edit, and disable connectors. | ||
|
|
||
| [float] | ||
| [[apm-alert-more-info]] | ||
| === More information | ||
|
|
||
| See {kibana-ref}/alerting-getting-started.html[alerting and actions] for more information. | ||
|
|
||
| NOTE: If you are using an **on-premise** Elastic Stack deployment with security, | ||
| TLS must be configured for communication between Elasticsearch and Kibana. | ||
| More information is in the alerting {kibana-ref}/alerting-getting-started.html#alerting-setup-prerequisites[prerequisites]. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.