Setting Smart Alerts for Synthetic tests

You can configure Smart Alerts for Synthetics to send an alert if a Synthetic test for a location fails. You can attach custom payloads to alert notifications.

Creating a Smart Alert

You can create Smart Alerts for Synthetic monitoring by using the API or the user interface.

Limitations:

  • You can create an alert for failures on a single metric only.
  • Blueprint, Unbounded Analytics, Adaptive threshold, and other types of thresholds are not available for Synthetic alerts.

For information about the Synthetic Smart Alert APIs, see the Smart Alerts for Synthetics section in Open API documentation. To use the API directly to create a Smart Alert for a Synthetic test, see the following example curl command:

curl -k --request POST \
  --url https://<Instana Synthetic monitoring Server host>/api/events/settings/global-alert-configs/synthetics \
  --header 'authorization: apiToken <TOKEN>' -H 'Content-Type: application/json' \
  --data '{
    "name":"Synthetics Alert on Failure Tests",
    "description":"Fire an alert on every failure test.",
    "severity":5,
    "syntheticTestIds":["cDtoVRy7V4zBxEjtGAnE", "KLI5uAsHJdJLQJO6fqm1"],
    "tagFilterExpression":{
        "type":"EXPRESSION",
            "logicalOperator":"AND",
            "elements":[]
     },
    "rule":{
        "alertType":"failure",
        "metricName":"status"
     },
    "alertChannelIds":["DXDCD9qihKmxRVZy"],
    "timeThreshold":{
    "type":"violationsInSequence",
    "violationsCount":1
        }
  }'
 

You can create Smart Alerts through simple or advanced mode. Advanced mode gives the option to attach custom payloads to Smart Alerts.

Adding Smart Alert

To create a Smart Alert, complete the following steps:

  1. On the Instana UI, click Synthetic Monitoring.
  2. Click the Smart Alerts tab and then click Create Smart Alert.
  3. Optional: You can also select a synthetic test and click the Add Synthetic Smart Alert from the Synthetic test dashboard to create Smart Alert for a synthetic test. You can include additional tests, when you create the Smart Alert by clicking the Add Synthetic Test button. The Create Smart Alert tear sheet screen is displayed. The entire configuration is categorized in the following steps:

    • Add synthetic tests
    • Configure alert
    • Add alert channels
    • Add alert properties

    Use the Next and Previous buttons to go through each step.

Adding synthetic tests

You can select the synthetic tests that fall within the evaluation scope. Failures in these tests are monitored, and separate alerts will be triggered for each synthetic test, based on location. With the filter option, you can scope down the evaluation by adding tag filter expressions. Each query filter connects with the AND logic operator by default.

To add synthetic tests, complete the following steps:

  1. Click Add synthetic tests button to open the available sythetic test list for selection.
  2. Optional: Click Add Filter button to add filter tags.

By default, the Smart Alert is created for scheduled tests. To create a Smart Alert for on-demand tests, use the Synthetic test run type filter.

Configuring alerts

You can define the conditions for triggering alerts. Specify the number of consecutive failures that must occur at each location before an alert is generated.

  • Choose grace period: Grace period defines how long an issue must remain open after the violation threshold is no longer met. After this time elapses, the issue is automatically closed.
  • Add alert channels: Configure alert channels to send the alert notifications. Click Add alert channel for selecting the alert channels from the list or create new alert channel.
  • Add alert properties: You can define a name and description for the alert that will be triggered when threshold conditions are breached. You can also configure both static and dynamic custom payloads to be included in the alert notification. Additionally, you can set the severity level as either Warning or Critical. You can enter a static title or create a dynamic title by inserting one or more placeholders from the menu. Optionally, provide a description for the alert — ideally, a brief summary along with recommended steps to take when the alert is triggered.

Custom payloads to a Smart Alert

To include additional payloads in alert notifications sent by Instana, click Add Row in Custom Payloads.

Both global custom payload and alert-specific custom payload are included in alert notifications if applicable, but the alert-specific configuration has priority over the global configuration. As a result, if the same key is used, the value of the global custom payload field is overridden by the alert-specific one. Along with static custom payloads, Dynamic custom payload fields in alert-specific configuration are also supported. You can see the globally defined custom payloads that are used in the alert configuration.

Click Create button to save the configuration.

Viewing Smart Alerts

You can view the Smart Alert configurations for Synthetics in the Smart Alerts tab in the Synthetic monitoring page and the Synthetic test dashboard page on the Instana UI.

After an alert is triggered for a Synthetic test, the resulting event will appear on the Events page.

Editing a Smart Alert

To edit an alert, complete the following steps:

  1. On the Instana UI, click Synthetic Monitoring.
  2. Click the Smart Alerts tab.
  3. Click the ellipsis button at the end of specific smart alert configuration row and then click Edit.
  4. Edit the alert configuration by navigating through each step.
  5. Click Save. The alert configuration is saved.

Duplicating a Smart Alert

To duplicate an alert, complete the following steps:

  1. On the Instana UI, click Synthetic Monitoring.
  2. Click the Smart Alerts tab.
  3. Click the ellipsis button against the alert and then click Duplicate. The Create Smart Alert tearsheet window is displayed.
  4. Optional: Edit the alert configuration.
  5. Click Create. A duplicate copy of the alert configuration is saved.