Alert rule for automated monitoring and alerting in ML systems. An AlertRule defines conditions that automatically trigger notifications when ML model metrics exceed specified thresholds. Alert rules are essential for proactive monitoring of model performance, data drift, and operational issues.Documentation Index
Fetch the complete documentation index at: https://handbook.fiddler.ai/llms.txt
Use this file to discover all available pages before exploring further.
Example
Alert rules continuously monitor metrics and trigger notifications when thresholds are exceeded. Use appropriate evaluation delays to avoid false positives from temporary data fluctuations.
Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | str | ✗ | None | Human-readable name for the alert rule. Should be descriptive and unique within the model context. |
model_id | `UUID | str` | ✗ | None |
metric_id | `str | UUID` | ✗ | None |
priority | `Priority | str` | ✗ | None |
compare_to | `CompareTo | str` | ✗ | None |
condition | `AlertCondition | str` | ✗ | None |
bin_size | `BinSize | str` | ✗ | None |
threshold_type | `AlertThresholdAlgo | str` | ✗ | None |
auto_threshold_params | dict[str, Any] | None | ✗ | None | Parameters for automatic threshold calculation. Used when threshold_type is AUTO. |
critical_threshold | `float | None` | ✗ | None |
warning_threshold | `float | None` | ✗ | None |
columns | list[str] | None | ✗ | None | List of feature columns to monitor. For feature-specific drift alerts. If None, monitors all features. |
baseline_id | `UUID | str | None` | ✗ |
segment_id | `UUID | str | None` | ✗ |
compare_bin_delta | `int | None` | ✗ | None |
evaluation_delay | int | ✗ | None | Delay in minutes before evaluating alerts. Helps avoid false positives from incomplete data. |
category | `str | None` | ✗ | None |
Example
After initialization, call create() to persist the alert rule to the Fiddler platform. Alert rules begin monitoring immediately after creation.
classmethod get(id_)
Retrieve an alert rule by its unique identifier. Fetches an alert rule from the Fiddler platform using its UUID. This method returns the complete alert rule configuration including thresholds, notification settings, and monitoring status.Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
id_ | `UUID | str` | ✗ | None |
Returns
The alert rule instance with all configuration and metadata populated from the server. Return type:AlertRule
Raises
- NotFound — If no alert rule exists with the specified ID.
- ApiError — If there’s an error communicating with the Fiddler API.
Example
This method makes an API call to fetch the latest alert rule configuration from the server, including any recent threshold or notification updates.
classmethod list(model_id, metric_id=None, columns=None, baseline_id=None, ordering=None)
Get a list of all alert rules in the organization.Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model_id | `UUID | str` | ✗ | None |
metric_id | `UUID | str | None` | ✗ |
columns | list[str] | None | ✗ | None | list rules set on the specified list of columns |
baseline_id | `UUID | str | None` | ✗ |
ordering | list[str] | None | ✗ | None | order result as per list of fields. [“-field_name”] for descending |
Returns
paginated list of alert rules for the specified filters Return type: Iterator[AlertRule]delete()
Delete an alert rule. Return type: Nonecreate()
Create a new alert rule. Return type: AlertRuleupdate()
Update an existing alert rule. Return type: Noneenable_notifications()
Enable notifications for an alert rule Return type: Nonedisable_notifications()
Disable notifications for an alert rule Return type: Noneset_notification_config()
Set notification config for an alert ruleParameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
emails | list[str] | None | ✗ | None | list of emails |
pagerduty_services | list[str] | None | ✗ | None | list of pagerduty services |
pagerduty_severity | `str | None` | ✗ | None |
webhooks | list[UUID] | None | ✗ | None | list of webhooks UUIDs |