| 1 | # you can disable an alarm notification by setting the 'to' line to: silent |
| 2 | |
| 3 | # --- Workspace SLI: Availability --- |
| 4 | |
| 5 | # Query availability (0-100%). Low is bad. |
| 6 | # Azure SLA: 99.9% for Log Analytics queries. |
| 7 | |
| 8 | template: am_log_analytics_query_availability |
| 9 | on: azure_monitor.log_analytics.query_availability |
| 10 | class: Availability |
| 11 | type: Other |
| 12 | component: Log Analytics |
| 13 | lookup: average -5m unaligned of availability |
| 14 | units: percentage |
| 15 | every: 1m |
| 16 | warn: $this < (($status >= $WARNING) ? (99.9) : (99)) |
| 17 | crit: $this < (($status == $CRITICAL) ? (99) : (90)) |
| 18 | delay: down 5m multiplier 1.5 max 1h |
| 19 | summary: Log Analytics query availability on ${label:resource_name} |
| 20 | info: Query availability of Log Analytics workspace ${label:resource_name} \ |
| 21 | in ${label:resource_group} (${label:region}) |
| 22 | to: sysadmin |
| 23 | |
| 24 | # --- Workspace SLI: Ingestion --- |
| 25 | |
| 26 | # Ingestion latency (seconds). High is bad. |
| 27 | # AMBA: average ingestion latency > 300s (5 min) is concerning. |
| 28 | |
| 29 | template: am_log_analytics_ingestion_latency |
| 30 | on: azure_monitor.log_analytics.ingestion_latency |
| 31 | class: Latency |
| 32 | type: Other |
| 33 | component: Log Analytics |
| 34 | lookup: average -5m unaligned of average |
| 35 | units: seconds |
| 36 | every: 1m |
| 37 | warn: $this > (($status >= $WARNING) ? (180) : (300)) |
| 38 | crit: $this > (($status == $CRITICAL) ? (300) : (600)) |
| 39 | delay: down 5m multiplier 1.5 max 1h |
| 40 | summary: Log Analytics ingestion latency on ${label:resource_name} |
| 41 | info: Average data ingestion latency for Log Analytics workspace ${label:resource_name} \ |
| 42 | in ${label:resource_group} (${label:region}). \ |
| 43 | High latency means data takes longer to become queryable. |
| 44 | to: sysadmin |
| 45 | |
| 46 | # --- User Queries: Failures --- |
| 47 | |
| 48 | # Helper: total query count over 5 minutes |
| 49 | template: am_log_analytics_query_total |
| 50 | on: azure_monitor.log_analytics.queries |
| 51 | class: Workload |
| 52 | type: Other |
| 53 | component: Log Analytics |
| 54 | lookup: sum -5m unaligned of total |
| 55 | units: queries |
| 56 | every: 1m |
| 57 | info: Total queries on Log Analytics workspace ${label:resource_name} \ |
| 58 | in ${label:resource_group} (${label:region}) |
| 59 | |
| 60 | # Query failure rate as percentage of total queries. |
| 61 | # Any sustained query failures indicate workspace or query problems. |
| 62 | |
| 63 | template: am_log_analytics_query_failure_rate |
| 64 | on: azure_monitor.log_analytics.queries |
| 65 | class: Errors |
| 66 | type: Other |
| 67 | component: Log Analytics |
| 68 | lookup: sum -5m unaligned of failed |
| 69 | calc: ($am_log_analytics_query_total > 0) ? ($this * 100 / $am_log_analytics_query_total) : (0) |
| 70 | units: % |
| 71 | every: 1m |
| 72 | warn: $this > (($status >= $WARNING) ? (3) : (5)) |
| 73 | crit: $this > (($status == $CRITICAL) ? (5) : (15)) |
| 74 | delay: down 5m multiplier 1.5 max 1h |
| 75 | summary: Log Analytics query failures on ${label:resource_name} |
| 76 | info: Percentage of failed queries on Log Analytics workspace ${label:resource_name} \ |
| 77 | in ${label:resource_group} (${label:region}) |
| 78 | to: sysadmin |
| 79 | |
| 80 | # --- Data Export --- |
| 81 | |
| 82 | # Export failures (rate). Any sustained export failures need attention. |
| 83 | |
| 84 | template: am_log_analytics_export_failures |
| 85 | on: azure_monitor.log_analytics.export_failures |
| 86 | class: Errors |
| 87 | type: Other |
| 88 | component: Log Analytics |
| 89 | lookup: average -5m unaligned of failed |
| 90 | units: exports/s |
| 91 | every: 1m |
| 92 | warn: $this != nan AND $this > (($status >= $WARNING) ? (0) : (1)) |
| 93 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (1) : (5)) |
| 94 | delay: down 5m multiplier 1.5 max 1h |
| 95 | summary: Log Analytics export failures on ${label:resource_name} |
| 96 | info: Data export failure rate for Log Analytics workspace ${label:resource_name} \ |
| 97 | in ${label:resource_group} (${label:region}). \ |
| 98 | Failures mean exported data is not reaching the destination. |
| 99 | to: sysadmin |
| 100 | |
| 101 | # --- Legacy Agent: CPU --- |
| 102 | |
| 103 | # CPU utilization from legacy Log Analytics agents. |
| 104 | |
| 105 | template: am_log_analytics_legacy_cpu |
| 106 | on: azure_monitor.log_analytics.legacy_cpu_utilization |
| 107 | class: Utilization |
| 108 | type: Other |
| 109 | component: Log Analytics |
| 110 | lookup: average -5m unaligned of processor |
| 111 | units: percentage |
| 112 | every: 1m |
| 113 | warn: $this != nan AND $this > (($status >= $WARNING) ? (80) : (90)) |
| 114 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (90) : (95)) |
| 115 | delay: down 5m multiplier 1.5 max 1h |
| 116 | summary: Legacy agent CPU on ${label:resource_name} |
| 117 | info: Processor time reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 118 | in ${label:resource_group} (${label:region}) |
| 119 | to: sysadmin |
| 120 | |
| 121 | # --- Legacy Agent: Memory --- |
| 122 | |
| 123 | # Memory utilization from legacy Log Analytics agents. High is bad. |
| 124 | |
| 125 | template: am_log_analytics_legacy_memory |
| 126 | on: azure_monitor.log_analytics.legacy_memory_utilization |
| 127 | class: Utilization |
| 128 | type: Other |
| 129 | component: Log Analytics |
| 130 | lookup: average -5m unaligned of used |
| 131 | units: percentage |
| 132 | every: 1m |
| 133 | warn: $this != nan AND $this > (($status >= $WARNING) ? (80) : (90)) |
| 134 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (90) : (95)) |
| 135 | delay: down 5m multiplier 1.5 max 1h |
| 136 | summary: Legacy agent memory on ${label:resource_name} |
| 137 | info: Memory utilization reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 138 | in ${label:resource_group} (${label:region}) |
| 139 | to: sysadmin |
| 140 | |
| 141 | # --- Legacy Agent: Swap --- |
| 142 | |
| 143 | # Swap utilization from legacy Log Analytics agents. High is bad. |
| 144 | |
| 145 | template: am_log_analytics_legacy_swap |
| 146 | on: azure_monitor.log_analytics.legacy_swap_utilization |
| 147 | class: Utilization |
| 148 | type: Other |
| 149 | component: Log Analytics |
| 150 | lookup: average -5m unaligned of used |
| 151 | units: percentage |
| 152 | every: 1m |
| 153 | warn: $this != nan AND $this > (($status >= $WARNING) ? (50) : (70)) |
| 154 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (70) : (90)) |
| 155 | delay: down 5m multiplier 1.5 max 1h |
| 156 | summary: Legacy agent swap usage on ${label:resource_name} |
| 157 | info: Swap utilization reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 158 | in ${label:resource_group} (${label:region}) |
| 159 | to: sysadmin |
| 160 | |
| 161 | # --- Legacy Agent: Disk Space --- |
| 162 | |
| 163 | # Disk space utilization from legacy Log Analytics agents. High is bad. |
| 164 | |
| 165 | template: am_log_analytics_legacy_disk_space |
| 166 | on: azure_monitor.log_analytics.legacy_disk_space_utilization |
| 167 | class: Utilization |
| 168 | type: Other |
| 169 | component: Log Analytics |
| 170 | lookup: average -5m unaligned of used |
| 171 | units: percentage |
| 172 | every: 1m |
| 173 | warn: $this != nan AND $this > (($status >= $WARNING) ? (80) : (85)) |
| 174 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (85) : (95)) |
| 175 | delay: down 5m multiplier 1.5 max 1h |
| 176 | summary: Legacy agent disk space on ${label:resource_name} |
| 177 | info: Disk space utilization reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 178 | in ${label:resource_group} (${label:region}) |
| 179 | to: sysadmin |
| 180 | |
| 181 | # --- Legacy Agent: Disk Inodes --- |
| 182 | |
| 183 | # Inode utilization from legacy Log Analytics agents. High is bad. |
| 184 | |
| 185 | template: am_log_analytics_legacy_disk_inodes |
| 186 | on: azure_monitor.log_analytics.legacy_disk_inodes |
| 187 | class: Utilization |
| 188 | type: Other |
| 189 | component: Log Analytics |
| 190 | lookup: average -5m unaligned of used |
| 191 | units: percentage |
| 192 | every: 1m |
| 193 | warn: $this != nan AND $this > (($status >= $WARNING) ? (80) : (85)) |
| 194 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (85) : (95)) |
| 195 | delay: down 5m multiplier 1.5 max 1h |
| 196 | summary: Legacy agent inode usage on ${label:resource_name} |
| 197 | info: Inode utilization reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 198 | in ${label:resource_group} (${label:region}) |
| 199 | to: sysadmin |
| 200 | |
| 201 | # --- Legacy Agent: Disk I/O Latency --- |
| 202 | |
| 203 | # Disk I/O latency from legacy Log Analytics agents. High is bad. |
| 204 | # Read and write latency in seconds per operation. |
| 205 | |
| 206 | template: am_log_analytics_legacy_disk_read_latency |
| 207 | on: azure_monitor.log_analytics.legacy_disk_io_latency |
| 208 | class: Latency |
| 209 | type: Other |
| 210 | component: Log Analytics |
| 211 | lookup: average -5m unaligned of read |
| 212 | units: seconds |
| 213 | every: 1m |
| 214 | warn: $this != nan AND $this > (($status >= $WARNING) ? (0.05) : (0.1)) |
| 215 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (0.1) : (0.5)) |
| 216 | delay: down 5m multiplier 1.5 max 1h |
| 217 | summary: Legacy agent disk read latency on ${label:resource_name} |
| 218 | info: Average disk read latency reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 219 | in ${label:resource_group} (${label:region}) |
| 220 | to: sysadmin |
| 221 | |
| 222 | template: am_log_analytics_legacy_disk_write_latency |
| 223 | on: azure_monitor.log_analytics.legacy_disk_io_latency |
| 224 | class: Latency |
| 225 | type: Other |
| 226 | component: Log Analytics |
| 227 | lookup: average -5m unaligned of write |
| 228 | units: seconds |
| 229 | every: 1m |
| 230 | warn: $this != nan AND $this > (($status >= $WARNING) ? (0.05) : (0.1)) |
| 231 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (0.1) : (0.5)) |
| 232 | delay: down 5m multiplier 1.5 max 1h |
| 233 | summary: Legacy agent disk write latency on ${label:resource_name} |
| 234 | info: Average disk write latency reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 235 | in ${label:resource_group} (${label:region}) |
| 236 | to: sysadmin |
| 237 | |
| 238 | # --- Legacy Agent: Disk Queue --- |
| 239 | |
| 240 | # Disk queue length from legacy Log Analytics agents. High means I/O saturation. |
| 241 | |
| 242 | template: am_log_analytics_legacy_disk_queue |
| 243 | on: azure_monitor.log_analytics.legacy_disk_queue |
| 244 | class: Workload |
| 245 | type: Other |
| 246 | component: Log Analytics |
| 247 | lookup: average -5m unaligned of queue_length |
| 248 | units: operations |
| 249 | every: 1m |
| 250 | warn: $this != nan AND $this > (($status >= $WARNING) ? (2) : (5)) |
| 251 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (5) : (10)) |
| 252 | delay: down 5m multiplier 1.5 max 1h |
| 253 | summary: Legacy agent disk queue on ${label:resource_name} |
| 254 | info: Current disk queue length reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 255 | in ${label:resource_group} (${label:region}). \ |
| 256 | High queue length indicates I/O saturation. |
| 257 | to: sysadmin |
| 258 | |
| 259 | # --- Legacy Agent: Network Errors --- |
| 260 | |
| 261 | # Network errors from legacy Log Analytics agents. |
| 262 | |
| 263 | template: am_log_analytics_legacy_network_rx_errors |
| 264 | on: azure_monitor.log_analytics.legacy_network_errors |
| 265 | class: Errors |
| 266 | type: Other |
| 267 | component: Log Analytics |
| 268 | lookup: average -5m unaligned of rx |
| 269 | units: errors |
| 270 | every: 1m |
| 271 | warn: $this != nan AND $this > (($status >= $WARNING) ? (5) : (10)) |
| 272 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (10) : (50)) |
| 273 | delay: down 5m multiplier 1.5 max 1h |
| 274 | summary: Legacy agent network RX errors on ${label:resource_name} |
| 275 | info: Network receive errors reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 276 | in ${label:resource_group} (${label:region}) |
| 277 | to: sysadmin |
| 278 | |
| 279 | template: am_log_analytics_legacy_network_tx_errors |
| 280 | on: azure_monitor.log_analytics.legacy_network_errors |
| 281 | class: Errors |
| 282 | type: Other |
| 283 | component: Log Analytics |
| 284 | lookup: average -5m unaligned of tx |
| 285 | units: errors |
| 286 | every: 1m |
| 287 | warn: $this != nan AND $this > (($status >= $WARNING) ? (5) : (10)) |
| 288 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (10) : (50)) |
| 289 | delay: down 5m multiplier 1.5 max 1h |
| 290 | summary: Legacy agent network TX errors on ${label:resource_name} |
| 291 | info: Network transmit errors reported by legacy Log Analytics agent on ${label:resource_name} \ |
| 292 | in ${label:resource_group} (${label:region}) |
| 293 | to: sysadmin |