Smart Alerts for Synthetics
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
- Attaching custom payloads to a Smart Alert
- Viewing Smart Alerts
- Editing a Smart Alert
- Duplicating a Smart Alert
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.
To create a Smart Alert, complete the following steps:
-
Go to Synthetic Monitoring; for example, select the beaker icon in the left navigation menu:
-
Perform one of the following actions.
- Click the Tests tab.
- Click Add.
- Click Add Synthetic Smart Alert.
- Click the Smart Alerts tab and then click ADD SYNTHETIC SMART ALERT.
The Create Smart Alert wizard is displayed.
- Click the Tests tab.
-
Optional: To switch from wizard view, click Switch to Advanced Mode. The Create Smart Alert window is displayed.
-
Select the Synthetic tests for which you want to receive alerts.
-
Optional: To add Synthetic tests, click Add Synthetic Tests.
-
Click Next. Step 2: Scope is displayed.
-
Optional: To add a filter, click Add filter and select the criteria.
-
Click Next. Step 3: Time Threshold is displayed.
-
Set a count of consecutive failures per location to send alerts.
-
Click Next. Step 4: Alert Channels is displayed.
-
Select the alert channels.
-
Optional: To add alert channels, click Select Alert Channels.
-
Click Next. Step 5: Alert Properties is displayed.
-
Set the appearance for the alert. You can provide dynamic placeholders as part of the title. For example, you can use
${synthetic.testName}
, which resolves to the name of the test configuration. To view and insert the list of available placeholders, click Insert placeholder. -
Optional: To attach custom payloads, switch to Advanced Mode. For more information, see Attaching custom payloads to a Smart Alert.
-
Click Create. The alert is created.
Attaching custom payloads to a Smart Alert
You can attach custom payloads to a Smart Alert either while creating an alert in Advanced Mode or by editing an existing alert.
To attach custom payloads as key-value pairs in alert notifications, go to the Custom Payloads section, and then click Add Row .
-
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, in the case of using the same key, the value of the global custom payload field is overridden by the alert-specific one.
-
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 as follows:
Viewing Smart Alerts
You can view the Smart Alert for Synthetics configurations in the Smart Alerts tab of the Tests page and the Summary page in the Instana UI. After an alert fires for a Synthetic test, the alert can be viewed in the Events page.
When an alert has fired for a Synthetic test, the alert will be indicated on the alerts lane in the widgets in the Summary page.
Editing a Smart Alert
To edit an alert, complete the following steps:
- Display the Synthetic monitoring main page.
- Click the Smart Alerts tab.
- Click the ellipsis button against the alert and then click Edit. The Edit Smart Alert window is displayed.
- Edit the alert configuration.
- Click Save. The alert configuration is saved.
Duplicating a Smart Alert
To duplicate an alert, complete the following steps:
- Display the Synthetic monitoring main page.
- Click the Smart Alerts tab.
- Click the ellipsis button against the alert and then click Duplicate. The Create Smart Alert window is displayed.
- Optional: Edit the alert configuration.
- Click Create. A duplicate copy of the alert configuration is saved.