Loading

Create an APM anomaly rule

Important

To use the APM Anomaly rule, you have to enable machine learning, which requires an appropriate license.

Note

For Observability serverless projects, the Editor role or higher is required to create anomaly rules. To learn more, refer to Assign user roles and privileges.

You can create an anomaly rule to alert you when either the latency, throughput, or failed transaction rate of a service is abnormal. Anomaly rules can be set at different levels: environment, service, and/or transaction type. Add actions to raise alerts via services or third-party integrations (for example, send an email or create a Jira issue).

Create rule for APM anomaly alert
Tip

These steps show how to use the Alerts UI. You can also create an anomaly rule directly from any page within Applications. Click the Alerts and rules button, and select Create anomaly rule. When you create a rule this way, the Name and Tags fields will be prepopulated but you can still change these.

To create your anomaly rule:

  1. In Observability UI, go to Alerts.
  2. Select Manage Rules from the Alerts page, and select Create rule.
  3. Enter a Name for your rule, and any optional Tags for more granular reporting (leave blank if unsure).
  4. Select the APM Anomaly rule type.
  5. Select the appropriate Service, Type, and Environment (or leave ALL to include all options).
  6. Select the desired severity (critical, major, minor, warning) from Has anomaly with severity.
  7. Define the interval to check the rule (for example, check every 1 minute).
  8. (Optional) Set up Actions.
  9. Save your rule.

You can extend your rules with actions that interact with third-party systems, write to logs or indices, or send user notifications. You can add an action to a rule at any time. You can create rules without adding actions, and you can also define multiple actions for a single rule.

To add actions to rules, you must first create a connector for that service (for example, an email or external incident management system), which you can then use for different rules, each with their own action frequency.