| 1 | # you can disable an alarm notification by setting the 'to' line to: silent |
| 2 | |
| 3 | # --- Utilization --- |
| 4 | |
| 5 | template: am_sql_managed_instance_cpu |
| 6 | on: azure_monitor.sql_managed_instance.cpu |
| 7 | class: Utilization |
| 8 | type: Database |
| 9 | component: Azure SQL MI |
| 10 | lookup: average -5m unaligned of average |
| 11 | units: percentage |
| 12 | every: 1m |
| 13 | warn: $this > (($status >= $WARNING) ? (75) : (85)) |
| 14 | crit: $this > (($status == $CRITICAL) ? (85) : (95)) |
| 15 | delay: down 5m multiplier 1.5 max 1h |
| 16 | summary: SQL MI CPU utilization on ${label:resource_name} |
| 17 | info: Average CPU utilization of SQL Managed Instance ${label:resource_name} \ |
| 18 | in ${label:resource_group} (${label:region}). \ |
| 19 | Sustained high CPU indicates insufficient compute tier or query optimization needed |
| 20 | to: dba |
| 21 | |
| 22 | template: am_sql_managed_instance_storage_utilization |
| 23 | on: azure_monitor.sql_managed_instance.storage |
| 24 | class: Utilization |
| 25 | type: Database |
| 26 | component: Azure SQL MI |
| 27 | calc: ($reserved > 0) ? ($used * 100 / $reserved) : (0) |
| 28 | units: % |
| 29 | every: 5m |
| 30 | warn: $this > (($status >= $WARNING) ? (80) : (85)) |
| 31 | crit: $this > (($status == $CRITICAL) ? (85) : (90)) |
| 32 | delay: down 5m multiplier 1.5 max 1h |
| 33 | summary: SQL MI storage utilization on ${label:resource_name} |
| 34 | info: Storage used as a percentage of reserved storage on SQL Managed Instance ${label:resource_name} \ |
| 35 | in ${label:resource_group} (${label:region}). \ |
| 36 | Approaching reserved storage limit may cause write failures |
| 37 | to: dba |
| 38 | |
| 39 | # --- Workload --- |
| 40 | |
| 41 | template: am_sql_managed_instance_io_requests |
| 42 | on: azure_monitor.sql_managed_instance.io_requests |
| 43 | class: Workload |
| 44 | type: Database |
| 45 | component: Azure SQL MI |
| 46 | lookup: average -5m unaligned of average |
| 47 | units: requests/s |
| 48 | every: 1m |
| 49 | warn: $this > (($status >= $WARNING) ? (4000) : (5000)) |
| 50 | crit: $this > (($status == $CRITICAL) ? (5000) : (7500)) |
| 51 | delay: down 5m multiplier 1.5 max 1h |
| 52 | summary: SQL MI I/O requests on ${label:resource_name} |
| 53 | info: Average I/O requests per second on SQL Managed Instance ${label:resource_name} \ |
| 54 | in ${label:resource_group} (${label:region}). \ |
| 55 | High I/O request rates may indicate I/O bottleneck or unoptimized queries |
| 56 | to: dba |