Rules
Anomaly Formula: Percentage-By-Median
What it does:
This rule compares the most recent value with the median of your historical usage. If the percentage difference meets or exceeds your defined threshold, and the change direction matches your selected type, an alert is triggered.
When to use it:
Use this when your usage data may have occasional spikes or outliers, and you want to detect unusual behavior based on your typical (middle) usage level—not skewed by highs or lows.
Examples
✅ Example 1: Increase Triggers Alert
- Anomaly Formula: PercentageByMedian
- Change Type: Increased
- Threshold: 25
- History: 80, 82, 83, 81, 80, 105
- Explanation:
- Median (excluding latest) = sorted [80, 80, 81, 82, 83] → middle = 81
- Latest = 105
- Percent change = ((105 – 81) / 81) * 100 ≈ 29.6%
- Above threshold → ✅ Alert triggered
❌ Example 2: Decrease But Below Threshold
- Anomaly Formula: PercentageByMedian
- Change Type: Decreased
- Threshold: 20
- History: 75, 74, 73, 76, 72, 70
- Explanation:
- Median = sorted [72, 73, 74, 75, 76] → middle = 74
- Latest = 70
- Percent change = ((70 – 74) / 74) * 100 ≈ -5.4%
- Drop is too small → ❌ No alert
✅ Example 3: Large Drop Triggers Alert (Change Type = Any)
- Anomaly Formula: PercentageByMedian
- Change Type: Any
- Threshold: 50
- History: 90, 88, 91, 89, 87, 40
- Explanation:
- Median = sorted [87, 88, 89, 90, 91] → middle = 89
- Latest = 40
- Percent change = ((40 – 89) / 89) * 100 ≈ -55.1%
- Large enough and “Any” matches → ✅ Alert triggered