|
| 1 | +{ |
| 2 | + prometheusAlerts+:: { |
| 3 | + groups+: [ |
| 4 | + { |
| 5 | + name: 'RedisEnterpriseAlerts', |
| 6 | + rules: [ |
| 7 | + { |
| 8 | + alert: 'RedisEnterpriseClusterOutOfMemory', |
| 9 | + expr: ||| |
| 10 | + sum(redis_used_memory) by (redis_cluster, node) / sum(node_available_memory) by (redis_cluster, node) * 100 > %(alertsClusterOutOfMemoryThreshold)s |
| 11 | + ||| % $._config, |
| 12 | + 'for': '5m', |
| 13 | + labels: { |
| 14 | + severity: 'critical', |
| 15 | + }, |
| 16 | + annotations: { |
| 17 | + summary: 'Cluster has run out of memory.', |
| 18 | + description: |
| 19 | + ( |
| 20 | + 'Memory usage is at {{ printf "%%.0f" $value }} percent on the cluster {{$labels.redis_cluster}}, ' + |
| 21 | + "which is above the configured threshold of %(alertsClusterOutOfMemoryThreshold)s%% of the cluster's available memory" |
| 22 | + ) % $._config, |
| 23 | + }, |
| 24 | + }, |
| 25 | + { |
| 26 | + alert: 'RedisEnterpriseNodeNotResponding', |
| 27 | + expr: ||| |
| 28 | + node_up == 0 |
| 29 | + ||| % $._config, |
| 30 | + 'for': '5m', |
| 31 | + labels: { |
| 32 | + severity: 'critical', |
| 33 | + }, |
| 34 | + annotations: { |
| 35 | + summary: 'A node in the Redis Enterprise cluster is offline or unreachable.', |
| 36 | + description: |
| 37 | + ( |
| 38 | + 'The node {{$labels.node}} in {{$labels.redis_cluster}} is offline or unreachable.' |
| 39 | + ) % $._config, |
| 40 | + }, |
| 41 | + }, |
| 42 | + { |
| 43 | + alert: 'RedisEnterpriseDatabaseNotResponding', |
| 44 | + expr: ||| |
| 45 | + bdb_up == 0 |
| 46 | + ||| % $._config, |
| 47 | + 'for': '5m', |
| 48 | + labels: { |
| 49 | + severity: 'critical', |
| 50 | + }, |
| 51 | + annotations: { |
| 52 | + summary: 'A database in the Redis Enterprise cluster is offline or unreachable.', |
| 53 | + description: |
| 54 | + ( |
| 55 | + 'The database {{$labels.bdb}} in {{$labels.redis_cluster}} is offline or unreachable.' |
| 56 | + ) % $._config, |
| 57 | + }, |
| 58 | + }, |
| 59 | + { |
| 60 | + alert: 'RedisEnterpriseShardNotResponding', |
| 61 | + expr: ||| |
| 62 | + redis_up == 0 |
| 63 | + ||| % $._config, |
| 64 | + 'for': '5m', |
| 65 | + labels: { |
| 66 | + severity: 'critical', |
| 67 | + }, |
| 68 | + annotations: { |
| 69 | + summary: 'A shard in the Redis Enterprise cluster is offline or unreachable.', |
| 70 | + description: |
| 71 | + ( |
| 72 | + 'The shard {{$labels.redis}} on database {{$labels.bdb}} running on node {{$labels.node}} in the cluster {{$labels.redis_cluster}} is offline or unreachable.' |
| 73 | + ) % $._config, |
| 74 | + }, |
| 75 | + }, |
| 76 | + { |
| 77 | + alert: 'RedisEnterpriseNodeHighCPUUtilization', |
| 78 | + expr: ||| |
| 79 | + (sum(node_cpu_user) by (node, redis_cluster, job) + sum(node_cpu_system) by (node, redis_cluster, job)) * 100 > %(alertsNodeCPUHighUtilizationThreshold)s |
| 80 | + ||| % $._config, |
| 81 | + 'for': '5m', |
| 82 | + labels: { |
| 83 | + severity: 'warning', |
| 84 | + }, |
| 85 | + annotations: { |
| 86 | + summary: 'Node CPU usage is above the configured threshold.', |
| 87 | + description: |
| 88 | + ( |
| 89 | + 'The node {{$labels.node}} in cluster {{$labels.redis_cluster}} has a CPU percentage of ${{ printf "%%.0f" $value }}, which exceeds ' + |
| 90 | + 'the threshold %(alertsNodeCPUHighUtilizationThreshold)s%%.' |
| 91 | + ) % $._config, |
| 92 | + }, |
| 93 | + }, |
| 94 | + { |
| 95 | + alert: 'RedisEnterpriseDatabaseHighMemoryUtilization', |
| 96 | + expr: ||| |
| 97 | + sum(bdb_used_memory) by (bdb, redis_cluster) / sum(bdb_memory_limit) by (bdb, redis_cluster) * 100 > %(alertsDatabaseHighMemoryUtiliation)s |
| 98 | + ||| % $._config, |
| 99 | + 'for': '5m', |
| 100 | + labels: { |
| 101 | + severity: 'warning', |
| 102 | + }, |
| 103 | + annotations: { |
| 104 | + summary: 'Node memory utilization is above the configured threshold.', |
| 105 | + description: |
| 106 | + ( |
| 107 | + 'The database {{$labels.bdb}} in cluster {{$labels.redis_cluster}} has a memory utiliztaion of ${{ printf "%%.0f" $value }}, which exceeds ' + |
| 108 | + 'the threshold %(alertsDatabaseHighMemoryUtiliation)s%%.' |
| 109 | + ) % $._config, |
| 110 | + }, |
| 111 | + }, |
| 112 | + { |
| 113 | + alert: 'RedisEnterpriseAverageLatencyIncreasing', |
| 114 | + expr: ||| |
| 115 | + bdb_avg_latency / 1000 > %(alertsDatabaseHighLatencyMs)s |
| 116 | + ||| % $._config, |
| 117 | + 'for': '5m', |
| 118 | + labels: { |
| 119 | + severity: 'warning', |
| 120 | + }, |
| 121 | + annotations: { |
| 122 | + summary: 'Operation latency is above the configured threshold.', |
| 123 | + description: |
| 124 | + ( |
| 125 | + 'The database {{$labels.bdb}} in cluster {{$labels.redis_cluster}} has high latency of ${{ printf "%%.0f" $value }}, which exceeds ' + |
| 126 | + 'the threshold of %(alertsDatabaseHighLatencyMs)s ms.' |
| 127 | + ) % $._config, |
| 128 | + }, |
| 129 | + }, |
| 130 | + { |
| 131 | + alert: 'RedisEnterpriseKeyEvictionsIncreasing', |
| 132 | + expr: ||| |
| 133 | + bdb_evicted_objects >= %(alertsEvictedObjectsThreshold)s |
| 134 | + ||| % $._config, |
| 135 | + 'for': '5m', |
| 136 | + labels: { |
| 137 | + severity: 'warning', |
| 138 | + }, |
| 139 | + annotations: { |
| 140 | + summary: 'The number of evicted objects is greater than or equal to the configured threshold.', |
| 141 | + description: |
| 142 | + ( |
| 143 | + 'The database {{$labels.bdb}} in cluster {{$labels.redis_cluster}} is evicting ${{ printf "%%.0f" $value }} objects, which exceeds ' + |
| 144 | + 'the threshold of %(alertsEvictedObjectsThreshold)s evicted objects.' |
| 145 | + ) % $._config, |
| 146 | + }, |
| 147 | + }, |
| 148 | + ], |
| 149 | + }, |
| 150 | + ], |
| 151 | + }, |
| 152 | +} |
0 commit comments