domino logo
5.3
  • Tech Ecosystem
  • Get Started
  • Domino Cloud
  • Code Assist
  • Collaborate
  • Projects
  • Work with Data
  • Workspaces
  • Environments
  • Executions
  • Deploy Models and Apps
  • Model Monitoring
  • Organizations
  • Security and Credentials
  • Notifications
  • Download the Audit Log
  • Search Your Domino Deployment
  • Domino CLI
  • Troubleshooting
  • Get Help
domino logo
About Domino
Domino Data LabKnowledge BaseData Science BlogTraining
User Guide
>
Model Monitoring
>
Set Up Model Monitor
>
Set Up Notifications

Set Up Notifications

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.

Prerequisite: Set up the SMTP server

  1. In the navigation pane, click Model Monitor.

  2. Click Settings and then click Notification Channels.

  3. Click Edit.

  4. Type the SMTP details in the fields provided.

  5. To use SMTPS instead of SMTP+STARTTLS, switch the Enable TLS toggle to the off position.

  6. Click Save Mail Config.

Configure global notification settings for monitored models

These notification settings are used for all monitored models that do not override them.

  1. In the navigation pane, click Model Monitor.

  2. Click the name of the model for which you want to set up notifications.

  3. Click Notifications.

  4. If you do not want to Use email address from global settings, switch the toggle to the off position. See Notification Channels.

  5. Click Edit.

  6. In the To Addresses field, type or paste a comma- or semicolon-separated list of email addresses.

  7. Click Save Mail Config.

Override the global notification settings for a monitored model

To use different notification settings for specific models, you can override the global notification settings:

  1. In the navigation pane, click Model Monitor.

  2. Click Settings and then click Notification Channels.

  3. Click Edit.

  4. Type the SMTP details in the fields provided.

  5. Type or paste a comma- or semicolon-separated list of email addresses.

  6. To use SMTPS instead of SMTP+STARTTLS, switch the Enable TLS toggle to the off position.

  7. Click Save Mail Config.

Caution

Send notifications with the API

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

The code examples below show how to construct the payload and send it to the /api/metricAlerts/v1 endpoint.

Note
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
Domino Data LabKnowledge BaseData Science BlogTraining
Copyright © 2022 Domino Data Lab. All rights reserved.