An alert must be tied to a specific subscription. To create an alert for a particular subscription, follow these steps:
Access the specific subscription view;
Click on the Alerts tab;
Click on the Add an alert button;
Select the type of alert (e.g., Lifetime Usage Amount);
Set the progressive thresholds and code for the alert;
Define the optional recurring threshold for the alert; and
Click on the “Create alert” button to confirm.
The alert threshold code helps distinguish between different types of alert notifications. For example, some notifications may indicate a soft limit, while others may trigger a hard limit, each with different levels of urgency or action required.
Lifetime Usage Amount (lifetime_usage_amount): Triggered when a subscription’s lifetime usage exceeds predefined thresholds.
Current Usage Amount (current_usage_amount): Triggered when a subscription’s usage exceeds predefined thresholds for the current billing period.
Billable Metric Current Usage Amount (billable_metric_current_usage_amount): Triggered when the usage of a specific billable metric exceeds predefined thresholds for the current billing period.
Billable Metric Current Usage Units (billable_metric_current_usage_units): Triggered when the number of units of a specific billable metric exceeds predefined thresholds for the current billing period.
After configuring an alert and starting to ingest usage, you can listen for the alert.triggered webhook message. These webhooks serve as notifications sent to your system, indicating when an alert threshold has been crossed, along with all the relevant alert details.
Alerts only evaluate usage data reported after their creation;
Alerts are processed close to real time; and
Each alert code must be unique per subscription, and only one alert per type (per billable metric for metric-scoped types) can exist on a subscription.