Creating and Managing Alerts
The Fiddler API client provides programmatic control for alert management alongside the Fiddler UI, enabling these key workflows:
Create alert rules
Remove alert rules
Retrieve all configured alert rules
Access triggered alert history
📘 Note: For UI-based alert configuration, refer to the alert setup guide.
Creating Alert Rules
The Fiddler client can be used to create a variety of alert rules types including Data Drift, Performance, Data Integrity, Service Metrics, and Custom Metrics.
The Fiddler client supports multiple alert rule types including:
Data Drift
Performance
Data Integrity
Service Metrics
Custom Metrics
For a complete list of supported alert metrics (specified via the metric_id
parameter), see our metrics reference.
Understanding Alert Thresholds
When configuring thresholds:
Absolute thresholds (
CompareTo.RAW_VALUE
): For percentage-based metrics likenull_violation_percentage
, express values as percentages (e.g., 10 for 10%).Relative thresholds (
CompareTo.TIME_PERIOD
): Express values as decimal fractions regardless of metric type (e.g., 0.1 for 10%)
Example Implementations
Example 1: Data Integrity Alert with Static Threshold
This example creates an alert that monitors for missing values in the age
column. It triggers notifications when null values exceed 5% (warning) or 10% (critical) of daily values.
Example 2: Data Integrity Alert with Historical Comparison
This example creates an alert that compares today's missing values against yesterday's values. It triggers when null values increase by 5% (warning) or 10% (critical) compared to the previous day.
Example 3: Performance Alert with Time-Based Comparison
This example creates a performance alert that monitors for precision changes. It compares today's precision with yesterday's values and triggers when precision decreases by 5% (warning) or 10% (critical).
🚧 Please note, the possible values for compare_bin_delta vs bin_size are:
BinSize.Hour
[1, 24, 24 * 7, 24 * 30, 24 * 90]
BinSize.Day
[1, 7, 30, 90]
BinSize.Week
[1]
BinSize.Month
[1]
Retrieving Alert Rules
The AlertRule.list() method retrieves alert rules that match your specified criteria. This method returns a Python iterator of matching rules.
Tip: All filter parameters are optional. Omit them to retrieve all alert rules.
Removing Alert Rules
To delete an alert rule, call the delete() method on an AlertRule object. You can retrieve the rule object using either:
Tip: Find the alert rule ID in the Alert Rule tab of your Fiddler Alerts page.
Accessing Triggered Alerts
Use the AlertRecord.list() method to retrieve alerts triggered by a specific rule:
Configuring Notifications
After creating an alert rule, configure how notifications are sent when the rule triggers. Fiddler supports these notification channels:
Email
PagerDuty
Slack webhooks
Custom webhooks
You can specify multiple notification types, and each type can have multiple recipients.
Important: PagerDuty, Slack webhooks, and custom webhooks must be pre-configured by your Fiddler administrator.
Last updated
Was this helpful?