A scheduled check is an automated instance of a running drift or model quality computation over a range of data. You can view the results on the monitoring dashboard, and automated email notifications are sent if thresholds are breached.
This topic describes how to configure notifications.
Set up the SMTP server:
-
In the navigation pane, click Model Monitor.
-
Click Settings and then click Notification Channels.
-
Click Edit.
-
Type the SMTP details in the fields provided.
-
To use SMTPS instead of SMTP+STARTTLS, switch the Enable TLS toggle to the off position.
-
Click Save Mail Config.
These notification settings are used for all monitored models that do not override them.
-
In the navigation pane, click Model Monitor.
-
Click the name of the model for which you want to set up notifications.
-
Click Notifications.
-
If you do not want to Use email address from global settings, switch the toggle to the off position. See Notification Channels.
-
Click Edit.
-
In the To Addresses field, type or paste a comma- or semicolon-separated list of email addresses.
-
Click Save Mail Config.
To use different notification settings for specific models, you can override the global notification settings:
-
In the navigation pane, click Model Monitor.
-
Click Settings and then click Notification Channels.
-
Click Edit.
-
Type the SMTP details in the fields provided.
-
Type or paste a comma- or semicolon-separated list of email addresses.
-
To use SMTPS instead of SMTP+STARTTLS, switch the Enable TLS toggle to the off position.
-
Click Save Mail Config.
Caution
| The global list was set up by your administrator during installation. This procedure overrides the global default notifications for all Model Monitors. |
In your project code, you can use the Domino API to send alerts or notifications.
The /api/metricAlerts/v1
REST API endpoint sends email when any of your monitoring metrics falls outside the thresholds you have defined in your code.
Deploy the code in a job (for one-time execution) or as a scheduled job (for continuous evaluation) to compute your model’s metrics and send alerts.
Alerts are sent to the recipients configured in the global notification settings for monitored models, except for models that override those notification settings as described above.
Note
| When notifications are sent using the API, Domino uses the SMTP server for global notifications, _not the server configured for model monitoring notifications. |
The code examples below show how to construct the payload and send it to the /api/metricAlerts/v1
endpoint.
Note
| You need your API key to access this endpoint. |
import requests
import json
url = "https://<DOMINO_HOST>/api/metricAlerts/v1"
api_key = "<DOMINO_API_KEY>"
payload = json.dumps({
"modelMonitoringId": "62471956481e88a77ae91210",
"metric": "testMetric",
"value": 1.0,
"targetRange": {
"lowerLimit": 2.0,
"upperLimit": 3.0,
"condition": "between"
}
})
headers = {
'X-Domino-Api-Key': api_key,
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
response.ok
The values for condition
are:
-
lessThan
-
lessThanEqual
-
greaterThan
-
greaterThanEqual
-
between
You can also add an optional description
string to include in the notifications.
Tip
|
Make sure that modelMonitoringId refers to the monitoring model ID and not the ID of the Model API.
To find the monitoring model ID, select your model in the Model Monitor and scroll down on the model’s Overview page.
|