| 1 | # you can disable an alarm notification by setting the 'to' line to: silent |
| 2 | |
| 3 | # --- Errors --- |
| 4 | |
| 5 | # Server-side errors indicate Service Bus infrastructure problems. |
| 6 | # AMBA: ServerErrors > 0 is Sev1 |
| 7 | |
| 8 | template: am_service_bus_server_errors |
| 9 | on: azure_monitor.service_bus.errors |
| 10 | class: Errors |
| 11 | type: Messaging |
| 12 | component: Azure Service Bus |
| 13 | lookup: average -5m unaligned of server |
| 14 | units: errors/s |
| 15 | every: 1m |
| 16 | warn: $this > (($status >= $WARNING) ? (0) : (1)) |
| 17 | crit: $this > (($status == $CRITICAL) ? (1) : (5)) |
| 18 | delay: down 5m multiplier 1.5 max 1h |
| 19 | summary: Service Bus server errors on ${label:resource_name} |
| 20 | info: Server-side error rate on Service Bus namespace ${label:resource_name} \ |
| 21 | in ${label:resource_group} (${label:region}) |
| 22 | to: sysadmin |
| 23 | |
| 24 | # Throttled requests mean the namespace has exceeded its messaging unit quotas. |
| 25 | # AMBA: ThrottledRequests > 0 is Sev1 |
| 26 | |
| 27 | template: am_service_bus_throttled_requests |
| 28 | on: azure_monitor.service_bus.errors |
| 29 | class: Errors |
| 30 | type: Messaging |
| 31 | component: Azure Service Bus |
| 32 | lookup: average -5m unaligned of throttled |
| 33 | units: errors/s |
| 34 | every: 1m |
| 35 | warn: $this > (($status >= $WARNING) ? (0) : (1)) |
| 36 | crit: $this > (($status == $CRITICAL) ? (1) : (5)) |
| 37 | delay: down 5m multiplier 1.5 max 1h |
| 38 | summary: Service Bus throttled requests on ${label:resource_name} |
| 39 | info: Rate of throttled requests on Service Bus namespace ${label:resource_name} \ |
| 40 | in ${label:resource_group} (${label:region}). \ |
| 41 | Indicates the namespace is exceeding its messaging unit quotas |
| 42 | to: sysadmin |
| 43 | |
| 44 | # User errors (400-class) at sustained high rate may indicate |
| 45 | # client misconfiguration or malformed messages. |
| 46 | |
| 47 | template: am_service_bus_user_errors |
| 48 | on: azure_monitor.service_bus.errors |
| 49 | class: Errors |
| 50 | type: Messaging |
| 51 | component: Azure Service Bus |
| 52 | lookup: average -5m unaligned of user |
| 53 | units: errors/s |
| 54 | every: 1m |
| 55 | warn: $this > (($status >= $WARNING) ? (10) : (25)) |
| 56 | delay: down 5m multiplier 1.5 max 1h |
| 57 | summary: Service Bus user errors on ${label:resource_name} |
| 58 | info: Rate of user (client-side) errors on Service Bus namespace ${label:resource_name} \ |
| 59 | in ${label:resource_group} (${label:region}) |
| 60 | to: sysadmin |
| 61 | |
| 62 | # --- Utilization (Premium tier only) --- |
| 63 | |
| 64 | # CPU utilization of Premium namespace messaging units. |
| 65 | # AMBA: NamespaceCpuUsage > 70 is Sev2 |
| 66 | |
| 67 | template: am_service_bus_namespace_cpu |
| 68 | on: azure_monitor.service_bus.namespace_resources |
| 69 | class: Utilization |
| 70 | type: Messaging |
| 71 | component: Azure Service Bus |
| 72 | lookup: average -5m unaligned of cpu |
| 73 | units: percentage |
| 74 | every: 1m |
| 75 | warn: $this != nan AND $this > (($status >= $WARNING) ? (70) : (80)) |
| 76 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (80) : (95)) |
| 77 | delay: down 5m multiplier 1.5 max 1h |
| 78 | summary: Service Bus namespace CPU on ${label:resource_name} |
| 79 | info: CPU utilization of Premium Service Bus namespace ${label:resource_name} \ |
| 80 | in ${label:resource_group} (${label:region}). \ |
| 81 | Only available on Premium tier namespaces |
| 82 | to: sysadmin |
| 83 | |
| 84 | # Memory utilization of Premium namespace messaging units. |
| 85 | # AMBA: NamespaceMemoryUsage > 70 is Sev2 |
| 86 | |
| 87 | template: am_service_bus_namespace_memory |
| 88 | on: azure_monitor.service_bus.namespace_resources |
| 89 | class: Utilization |
| 90 | type: Messaging |
| 91 | component: Azure Service Bus |
| 92 | lookup: average -5m unaligned of memory |
| 93 | units: percentage |
| 94 | every: 1m |
| 95 | warn: $this != nan AND $this > (($status >= $WARNING) ? (70) : (80)) |
| 96 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (80) : (95)) |
| 97 | delay: down 5m multiplier 1.5 max 1h |
| 98 | summary: Service Bus namespace memory on ${label:resource_name} |
| 99 | info: Memory utilization of Premium Service Bus namespace ${label:resource_name} \ |
| 100 | in ${label:resource_group} (${label:region}). \ |
| 101 | Only available on Premium tier namespaces |
| 102 | to: sysadmin |
| 103 | |
| 104 | # --- Latency --- |
| 105 | |
| 106 | # Server send latency measures how long Service Bus takes to complete |
| 107 | # send operations. High latency indicates performance degradation. |
| 108 | |
| 109 | template: am_service_bus_send_latency |
| 110 | on: azure_monitor.service_bus.send_latency |
| 111 | class: Latency |
| 112 | type: Messaging |
| 113 | component: Azure Service Bus |
| 114 | lookup: average -5m unaligned of average |
| 115 | units: milliseconds |
| 116 | every: 1m |
| 117 | warn: $this > (($status >= $WARNING) ? (500) : (1000)) |
| 118 | crit: $this > (($status == $CRITICAL) ? (1000) : (3000)) |
| 119 | delay: down 5m multiplier 1.5 max 1h |
| 120 | summary: Service Bus send latency on ${label:resource_name} |
| 121 | info: Average server send latency on Service Bus namespace ${label:resource_name} \ |
| 122 | in ${label:resource_group} (${label:region}) |
| 123 | to: sysadmin |
| 124 | |
| 125 | # --- Saturation --- |
| 126 | |
| 127 | # Dead-lettered messages accumulate when messages cannot be processed |
| 128 | # after max delivery attempts or when they expire. Growing dead letter |
| 129 | # queues indicate consumer failures or poison messages. |
| 130 | # AMBA: DeadletteredMessages > 0 is Sev2 |
| 131 | |
| 132 | template: am_service_bus_dead_lettered_messages |
| 133 | on: azure_monitor.service_bus.problem_messages |
| 134 | class: Errors |
| 135 | type: Messaging |
| 136 | component: Azure Service Bus |
| 137 | lookup: average -5m unaligned of dead_lettered |
| 138 | units: messages |
| 139 | every: 1m |
| 140 | warn: $this > (($status >= $WARNING) ? (0) : (1)) |
| 141 | crit: $this > (($status == $CRITICAL) ? (10) : (100)) |
| 142 | delay: down 5m multiplier 1.5 max 1h |
| 143 | summary: Service Bus dead-lettered messages on ${label:resource_name} |
| 144 | info: Dead-lettered messages in Service Bus namespace ${label:resource_name} \ |
| 145 | in ${label:resource_group} (${label:region}). \ |
| 146 | Messages land in dead letter queue after exceeding max delivery attempts or expiring |
| 147 | to: sysadmin |
| 148 | |
| 149 | # Active message queue depth. Sustained growth means consumers |
| 150 | # are not keeping up with producers. |
| 151 | # AMBA: ActiveMessages > 100 is Sev2 |
| 152 | |
| 153 | template: am_service_bus_active_messages |
| 154 | on: azure_monitor.service_bus.queue_depth |
| 155 | class: Workload |
| 156 | type: Messaging |
| 157 | component: Azure Service Bus |
| 158 | lookup: average -10m unaligned of active |
| 159 | units: messages |
| 160 | every: 1m |
| 161 | warn: $this > (($status >= $WARNING) ? (5000) : (10000)) |
| 162 | crit: $this > (($status == $CRITICAL) ? (10000) : (50000)) |
| 163 | delay: down 5m multiplier 1.5 max 1h |
| 164 | summary: Service Bus queue depth on ${label:resource_name} |
| 165 | info: Active messages queued in Service Bus namespace ${label:resource_name} \ |
| 166 | in ${label:resource_group} (${label:region}). \ |
| 167 | Sustained growth means consumers are not keeping up with producers |
| 168 | to: sysadmin |
| 169 | |
| 170 | # --- Request Success --- |
| 171 | |
| 172 | # Helper: total incoming requests over 5 minutes (no alarm, just a value) |
| 173 | |
| 174 | template: am_service_bus_incoming_requests |
| 175 | on: azure_monitor.service_bus.requests |
| 176 | class: Workload |
| 177 | type: Messaging |
| 178 | component: Azure Service Bus |
| 179 | lookup: sum -5m unaligned of incoming |
| 180 | units: requests/s |
| 181 | every: 1m |
| 182 | info: Total incoming requests on Service Bus namespace ${label:resource_name} \ |
| 183 | in ${label:resource_group} (${label:region}) |
| 184 | |
| 185 | # Request success rate. Only fires when there is meaningful traffic |
| 186 | # to avoid false positives during idle periods. |
| 187 | |
| 188 | template: am_service_bus_request_success_rate |
| 189 | on: azure_monitor.service_bus.requests |
| 190 | class: Errors |
| 191 | type: Messaging |
| 192 | component: Azure Service Bus |
| 193 | lookup: sum -5m unaligned of successful |
| 194 | calc: ($am_service_bus_incoming_requests > 0) ? ($this * 100 / $am_service_bus_incoming_requests) : (100) |
| 195 | units: % |
| 196 | every: 1m |
| 197 | warn: ($am_service_bus_incoming_requests > 120) ? ($this < (($status >= $WARNING) ? (99) : (95))) : (0) |
| 198 | crit: ($am_service_bus_incoming_requests > 120) ? ($this < (($status == $CRITICAL) ? (95) : (80))) : (0) |
| 199 | delay: down 5m multiplier 1.5 max 1h |
| 200 | summary: Service Bus request success rate on ${label:resource_name} |
| 201 | info: Percentage of successful requests on Service Bus namespace ${label:resource_name} \ |
| 202 | in ${label:resource_group} (${label:region}) |
| 203 | to: sysadmin |
| 204 | |
| 205 | # --- Message Operations --- |
| 206 | |
| 207 | # Abandoned messages indicate consumers receiving but not processing messages. |
| 208 | # Sustained abandonment suggests poison messages or consumer failures. |
| 209 | |
| 210 | template: am_service_bus_abandoned_messages |
| 211 | on: azure_monitor.service_bus.message_operations |
| 212 | class: Errors |
| 213 | type: Messaging |
| 214 | component: Azure Service Bus |
| 215 | lookup: average -5m unaligned of abandoned |
| 216 | units: messages/s |
| 217 | every: 1m |
| 218 | warn: $this > (($status >= $WARNING) ? (1) : (5)) |
| 219 | delay: down 5m multiplier 1.5 max 1h |
| 220 | summary: Service Bus abandoned messages on ${label:resource_name} |
| 221 | info: Rate of abandoned messages on Service Bus namespace ${label:resource_name} \ |
| 222 | in ${label:resource_group} (${label:region}). \ |
| 223 | Consumers are receiving but failing to process messages |
| 224 | to: sysadmin |
| 225 | |
| 226 | # --- Replication (Geo-DR only) --- |
| 227 | |
| 228 | # Replication lag count measures how many messages are pending replication |
| 229 | # to the secondary namespace. Only relevant with Geo-DR configured. |
| 230 | |
| 231 | template: am_service_bus_replication_lag |
| 232 | on: azure_monitor.service_bus.replication_lag |
| 233 | class: Latency |
| 234 | type: Messaging |
| 235 | component: Azure Service Bus |
| 236 | lookup: average -5m unaligned of messages |
| 237 | units: messages |
| 238 | every: 1m |
| 239 | warn: $this != nan AND $this > (($status >= $WARNING) ? (100) : (1000)) |
| 240 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (1000) : (10000)) |
| 241 | delay: down 5m multiplier 1.5 max 1h |
| 242 | summary: Service Bus replication lag on ${label:resource_name} |
| 243 | info: Messages pending replication to secondary namespace on Service Bus ${label:resource_name} \ |
| 244 | in ${label:resource_group} (${label:region}). \ |
| 245 | Only relevant when Geo-DR is configured |
| 246 | to: sysadmin |
| 247 | |
| 248 | # Replication lag duration measures time behind the primary. |
| 249 | |
| 250 | template: am_service_bus_replication_lag_duration |
| 251 | on: azure_monitor.service_bus.replication_lag_duration |
| 252 | class: Latency |
| 253 | type: Messaging |
| 254 | component: Azure Service Bus |
| 255 | lookup: average -5m unaligned of duration |
| 256 | units: seconds |
| 257 | every: 1m |
| 258 | warn: $this != nan AND $this > (($status >= $WARNING) ? (30) : (60)) |
| 259 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (60) : (120)) |
| 260 | delay: down 5m multiplier 1.5 max 1h |
| 261 | summary: Service Bus replication lag duration on ${label:resource_name} |
| 262 | info: Replication lag duration to secondary namespace on Service Bus ${label:resource_name} \ |
| 263 | in ${label:resource_group} (${label:region}). \ |
| 264 | Only relevant when Geo-DR is configured |
| 265 | to: sysadmin |