| 1 | # you can disable an alarm notification by setting the 'to' line to: silent |
| 2 | |
| 3 | # --- Server Load --- |
| 4 | |
| 5 | template: am_redis_cache_server_load |
| 6 | on: azure_monitor.redis_cache.server_load |
| 7 | class: Utilization |
| 8 | type: Database |
| 9 | component: Azure Redis |
| 10 | lookup: average -5m unaligned of maximum |
| 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: Redis server load on ${label:resource_name} |
| 17 | info: Maximum server load on Azure Cache for Redis ${label:resource_name} \ |
| 18 | in ${label:resource_group} (${label:region}). \ |
| 19 | Sustained high server load causes timeouts and increased latency |
| 20 | to: dba |
| 21 | |
| 22 | # --- CPU --- |
| 23 | |
| 24 | template: am_redis_cache_cpu |
| 25 | on: azure_monitor.redis_cache.cpu |
| 26 | class: Utilization |
| 27 | type: Database |
| 28 | component: Azure Redis |
| 29 | lookup: average -5m unaligned of maximum |
| 30 | units: percentage |
| 31 | every: 1m |
| 32 | warn: $this > (($status >= $WARNING) ? (75) : (85)) |
| 33 | crit: $this > (($status == $CRITICAL) ? (85) : (95)) |
| 34 | delay: down 5m multiplier 1.5 max 1h |
| 35 | summary: Redis CPU on ${label:resource_name} |
| 36 | info: Maximum CPU utilization on Azure Cache for Redis ${label:resource_name} \ |
| 37 | in ${label:resource_group} (${label:region}) |
| 38 | to: dba |
| 39 | |
| 40 | # --- Memory Utilization --- |
| 41 | |
| 42 | template: am_redis_cache_memory_utilization |
| 43 | on: azure_monitor.redis_cache.memory_utilization |
| 44 | class: Utilization |
| 45 | type: Database |
| 46 | component: Azure Redis |
| 47 | lookup: average -5m unaligned of maximum |
| 48 | units: percentage |
| 49 | every: 1m |
| 50 | warn: $this > (($status >= $WARNING) ? (75) : (85)) |
| 51 | crit: $this > (($status == $CRITICAL) ? (85) : (95)) |
| 52 | delay: down 5m multiplier 1.5 max 1h |
| 53 | summary: Redis memory utilization on ${label:resource_name} |
| 54 | info: Maximum memory utilization on Azure Cache for Redis ${label:resource_name} \ |
| 55 | in ${label:resource_group} (${label:region}). \ |
| 56 | High memory causes evictions and potential data loss |
| 57 | to: dba |
| 58 | |
| 59 | # --- Cache Miss Rate --- |
| 60 | |
| 61 | template: am_redis_cache_miss_rate |
| 62 | on: azure_monitor.redis_cache.miss_rate |
| 63 | class: Utilization |
| 64 | type: Database |
| 65 | component: Azure Redis |
| 66 | lookup: average -10m unaligned of miss_rate |
| 67 | units: percentage |
| 68 | every: 1m |
| 69 | warn: $this > (($status >= $WARNING) ? (40) : (50)) |
| 70 | delay: down 5m multiplier 1.5 max 1h |
| 71 | summary: Redis cache miss rate on ${label:resource_name} |
| 72 | info: Cache miss rate on Azure Cache for Redis ${label:resource_name} \ |
| 73 | in ${label:resource_group} (${label:region}). \ |
| 74 | High miss rates indicate the cache is not effectively serving requests |
| 75 | to: dba |
| 76 | |
| 77 | # --- Errors --- |
| 78 | |
| 79 | template: am_redis_cache_errors |
| 80 | on: azure_monitor.redis_cache.errors |
| 81 | class: Errors |
| 82 | type: Database |
| 83 | component: Azure Redis |
| 84 | lookup: average -5m unaligned of maximum |
| 85 | units: errors |
| 86 | every: 1m |
| 87 | warn: $this > (($status >= $WARNING) ? (0) : (5)) |
| 88 | crit: $this > (($status == $CRITICAL) ? (5) : (20)) |
| 89 | delay: down 5m multiplier 1.5 max 1h |
| 90 | summary: Redis errors on ${label:resource_name} |
| 91 | info: Errors on Azure Cache for Redis ${label:resource_name} \ |
| 92 | in ${label:resource_group} (${label:region}). \ |
| 93 | Includes authentication failures, maxmemory errors, and connection issues |
| 94 | to: dba |
| 95 | |
| 96 | # --- Latency (average) --- |
| 97 | |
| 98 | template: am_redis_cache_latency |
| 99 | on: azure_monitor.redis_cache.latency |
| 100 | class: Latency |
| 101 | type: Database |
| 102 | component: Azure Redis |
| 103 | lookup: average -5m unaligned of average |
| 104 | units: microseconds |
| 105 | every: 1m |
| 106 | warn: $this > (($status >= $WARNING) ? (5000) : (10000)) |
| 107 | crit: $this > (($status == $CRITICAL) ? (10000) : (30000)) |
| 108 | delay: down 5m multiplier 1.5 max 1h |
| 109 | summary: Redis average latency on ${label:resource_name} |
| 110 | info: Average cache latency on Azure Cache for Redis ${label:resource_name} \ |
| 111 | in ${label:resource_group} (${label:region}) |
| 112 | to: dba |
| 113 | |
| 114 | # --- Latency P99 --- |
| 115 | |
| 116 | template: am_redis_cache_latency_p99 |
| 117 | on: azure_monitor.redis_cache.latency_p99 |
| 118 | class: Latency |
| 119 | type: Database |
| 120 | component: Azure Redis |
| 121 | lookup: average -5m unaligned of p99 |
| 122 | units: microseconds |
| 123 | every: 1m |
| 124 | warn: $this > (($status >= $WARNING) ? (10000) : (20000)) |
| 125 | crit: $this > (($status == $CRITICAL) ? (20000) : (50000)) |
| 126 | delay: down 5m multiplier 1.5 max 1h |
| 127 | summary: Redis P99 latency on ${label:resource_name} |
| 128 | info: P99 latency on Azure Cache for Redis ${label:resource_name} \ |
| 129 | in ${label:resource_group} (${label:region}). \ |
| 130 | Tail latency spikes indicate resource pressure or network issues |
| 131 | to: dba |
| 132 | |
| 133 | # --- Key Evictions --- |
| 134 | |
| 135 | template: am_redis_cache_evicted_keys |
| 136 | on: azure_monitor.redis_cache.key_events |
| 137 | class: Errors |
| 138 | type: Database |
| 139 | component: Azure Redis |
| 140 | lookup: average -5m unaligned of evicted |
| 141 | units: keys/s |
| 142 | every: 1m |
| 143 | warn: $this > (($status >= $WARNING) ? (50) : (100)) |
| 144 | crit: $this > (($status == $CRITICAL) ? (100) : (500)) |
| 145 | delay: down 5m multiplier 1.5 max 1h |
| 146 | summary: Redis key evictions on ${label:resource_name} |
| 147 | info: Rate of evicted keys on Azure Cache for Redis ${label:resource_name} \ |
| 148 | in ${label:resource_group} (${label:region}). \ |
| 149 | Key evictions indicate the cache is running out of memory |
| 150 | to: dba |
| 151 | |
| 152 | # --- Geo-Replication Health (optional — only present when geo-replication is configured) --- |
| 153 | |
| 154 | template: am_redis_cache_geo_replication_health |
| 155 | on: azure_monitor.redis_cache.geo_replication_health |
| 156 | class: Availability |
| 157 | type: Database |
| 158 | component: Azure Redis |
| 159 | lookup: average -5m unaligned of average |
| 160 | units: status |
| 161 | every: 1m |
| 162 | crit: $this != nan AND $this < 1 |
| 163 | delay: down 5m multiplier 1.5 max 1h |
| 164 | summary: Redis geo-replication health on ${label:resource_name} |
| 165 | info: Geo-replication link health on Azure Cache for Redis ${label:resource_name} \ |
| 166 | in ${label:resource_group} (${label:region}). \ |
| 167 | A value below 1 indicates the replication link is unhealthy |
| 168 | to: dba |
| 169 | |
| 170 | # --- Geo-Replication Lag (optional — only present when geo-replication is configured) --- |
| 171 | |
| 172 | template: am_redis_cache_geo_replication_lag |
| 173 | on: azure_monitor.redis_cache.geo_replication_lag |
| 174 | class: Latency |
| 175 | type: Database |
| 176 | component: Azure Redis |
| 177 | lookup: average -5m unaligned of average |
| 178 | units: seconds |
| 179 | every: 1m |
| 180 | warn: $this != nan AND $this > (($status >= $WARNING) ? (5) : (10)) |
| 181 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (10) : (30)) |
| 182 | delay: down 5m multiplier 1.5 max 1h |
| 183 | summary: Redis geo-replication lag on ${label:resource_name} |
| 184 | info: Geo-replication connectivity lag on Azure Cache for Redis ${label:resource_name} \ |
| 185 | in ${label:resource_group} (${label:region}). \ |
| 186 | High lag indicates network issues between primary and secondary regions |
| 187 | to: dba |
| 188 | |
| 189 | # --- Geo-Replication Sync Offset (optional — only present when geo-replication is configured) --- |
| 190 | |
| 191 | template: am_redis_cache_geo_replication_sync_offset |
| 192 | on: azure_monitor.redis_cache.geo_replication_sync_offset |
| 193 | class: Latency |
| 194 | type: Database |
| 195 | component: Azure Redis |
| 196 | lookup: average -5m unaligned of average |
| 197 | units: bytes |
| 198 | every: 1m |
| 199 | warn: $this != nan AND $this > (($status >= $WARNING) ? (1048576) : (5242880)) |
| 200 | crit: $this != nan AND $this > (($status == $CRITICAL) ? (5242880) : (52428800)) |
| 201 | delay: down 5m multiplier 1.5 max 1h |
| 202 | summary: Redis geo-replication sync offset on ${label:resource_name} |
| 203 | info: Geo-replication data sync offset on Azure Cache for Redis ${label:resource_name} \ |
| 204 | in ${label:resource_group} (${label:region}). \ |
| 205 | Large offset indicates the secondary is falling behind the primary |
| 206 | to: dba |