Homeโ€บ๐Ÿš€ Production Skillsโ€บModule 131 min read ยท 14/16

Alert Creation

Hands-on

Alert Structure

Anomaly detection โ€” create alerts for your extension metrics

Dynatrace has two alert systems. Classic metric events (Gen2) and Gen3 Davis anomaly detectors. Both work with extensions, but anomaly detectors are more powerful.

Gen3: Davis Anomaly Detectors (Recommended)

Model                   Best For                    Extension Example
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Static Threshold        Known limits                CPU > 90%, temp > 80ยฐC
Auto-Adaptive           Dynamic baselines           Traffic patterns
Seasonal Baseline       Daily/weekly patterns       Business-hour traffic

๐Ÿ›  Try it: Ctrl+K โ†’ "Anomaly detectors" โ†’ Create new โ†’ Use your extension metric: timeseries avg(com.dynatrace.extension.my-ext.cpu), interval:1m

Alert Naming Convention

[P1] Device Type โ€” What's Wrong (Critical)
[P3] Device Type โ€” What's Wrong (Warning)

Examples:
  [P1] Cisco Catalyst โ€” CPU Critical (>90%)
  [P3] Cisco Catalyst โ€” CPU Warning (>75%)
  [P1] FortiSwitch โ€” Interface Down
  [P1] F5 BIG-IP โ€” Pool Member Unavailable

Building an Alert Package

For a production extension, create alerts in pairs (P1 critical + P3 warning):

Metric                              P3 Warning    P1 Critical
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
CPU usage                           > 75%         > 90%
Memory usage                        > 80%         > 95%
Temperature                         > 70ยฐC        > 80ยฐC
Interface error rate                > 1%          > 5%
Interface utilization               > 80%         > 95%
Disk usage                          > 80%         > 90%

โš ๏ธ Always set alertOnMissingData: false for extension alerts. Devices go offline for maintenance โ€” you don't want false alerts.

Bundled Alerts

Include alert definitions in your extension package:

# extension.yaml
alerts:
  - path: alerts/high-cpu.json
  - path: alerts/high-memory.json
// alerts/high-cpu.json
{
  "name": "[P1] {device.name} โ€” CPU Critical",
  "metricId": "com.dynatrace.extension.my-ext.cpu",
  "threshold": 90,
  "alertCondition": "ABOVE",
  "samples": 5,
  "violatingSamples": 3,
  "dealertingSamples": 5
}