Calendar-Based Alerts
This document describes how the calendar-based evaluation period works for alerts and how to use it to monitor long-term trends and anomalies. To set up real-time alerts, see Real-Time Rolling Alerts.
Calendar-Based Evaluation Period
A calendar-based evaluation period sets the alert’s evaluation period to once per calendar interval. This means if you select a daily interval, Moesif aggregates your metric from 12:00 AM to 11:59 PM and sends a daily report. Similarly, if you select a weekly time period, you receive alerts once per week.
To change your calendar and timezone settings, see Apps and Team settings.
Calendar-based alerts aren’t real time since they look at longer historical trends compared to real-time alerts where evaluation occurs every minute. In contrast, for example in a daily calendar-based alert period, Moesif evaluates after each day at midnight to see if the previous period differs from history.
Calendar-based evaluation period lets you retrospectively monitor, detect, and act on long-term trends and anomalies.
Example: Set Dynamic Alert with Calendar-Based Evaluation Period to Monitor Long-Term Trends
This example sets up a dynamic alert that alerts you when your API incurs a large drop in usage.
Monitoring for significant drop in your product’s usage can help you proactively tackle urgent issues affecting your product, for example:
- Service outages or service degradation
- Customer integration issues
- SDK or client library bug
- Deprecation or breaking changes
- Loss of a major customer: a worst-case scenario
This use case requires a calendar-based dynamic alert that evaluates your target metric over a longer time period like a week or a month. The baseline itself is a long-term average; and we are looking for a change in the established pattern of usage. Therefore, we do not need real-time alert in this case.
Specify Event Filters
- Select API call event type.
- Only consider customers that has user IDs.
Select Group By
Categorize the metric by user IDs in the Group By pane. This helps you quickly identify affected customers and take appropriate measures like reaching out.
Specify the Metric
Select Event Count as the metric.
Specify Alert Rule Settings
- Enter a name for the alert
- Select Each Calendar Week as the evaluation period.
- Turn the alert on by selecting the on-off checkbox.
- Select Dynamic Alert as the alert type.
-
Select Decrease for the alert trigger direction since we want to detect decrease in usage.
Tip: For static alerts, you can select the any operator in Threshold to trigger the alert for every evaluation period regardless of any criteria. This is helpful in use cases like when you want to send daily or monthly reports of top customers.
- In metric anomaly detector settings, make sure to set them at a reasonable level that aligns with how often you want to get alerts.
- Select or create a new notification channel where you want Moesif to dispatch alert notifications to.
- Optionally, add a custom message or note to the alert. This shows up in the notification.
- Select Save.