|
189 | 189 | severity: 'critical',
|
190 | 190 | },
|
191 | 191 | },
|
192 |
| - { |
193 |
| - alert: 'PostgresReplicationIsStale', |
194 |
| - annotations: { |
195 |
| - description: '{{ $labels.instance }} replication slots have not been updated for a significant period, indicating potential issues with replication.', |
196 |
| - summary: 'PostgreSQL replication slots are stale.', |
197 |
| - }, |
198 |
| - expr: 'pg_replication_slots_xmin_age{slot_name =~ "^repmgr_slot_[0-9]+"} > 20000', |
199 |
| - 'for': '30m', |
200 |
| - labels: { |
201 |
| - severity: 'critical', |
202 |
| - }, |
203 |
| - }, |
204 | 192 | {
|
205 | 193 | alert: 'PostgresReplicationRoleChanged',
|
206 | 194 | annotations: {
|
|
224 | 212 | severity: 'critical',
|
225 | 213 | },
|
226 | 214 | },
|
227 |
| - { |
228 |
| - alert: 'PostgresHasTooManyDeadTuples', |
229 |
| - annotations: { |
230 |
| - description: '{{ $labels.instance }} has too many dead tuples, which may lead to inefficient query performance. Consider vacuuming the database.', |
231 |
| - summary: 'PostgreSQL has too many dead tuples.', |
232 |
| - }, |
233 |
| - expr: ||| |
234 |
| - (sum without(relname) ( |
235 |
| - pg_stat_user_tables_n_dead_tup{%(dbNameFilter)s} |
236 |
| - ) > 10000) / |
237 |
| - ((sum without(relname) ( |
238 |
| - pg_stat_user_tables_n_live_tup{%(dbNameFilter)s} |
239 |
| - ) + sum without(relname)( |
240 |
| - pg_stat_user_tables_n_dead_tup{%(dbNameFilter)s} |
241 |
| - )) > 0) >= 0.1 unless on(instance) ( |
242 |
| - pg_replication_is_replica{} == 1 |
243 |
| - ) |
244 |
| - ||| % $._config, |
245 |
| - 'for': '5m', |
246 |
| - labels: { |
247 |
| - severity: 'warning', |
248 |
| - }, |
249 |
| - }, |
250 | 215 | {
|
251 | 216 | alert: 'PostgresTablesNotVaccumed',
|
252 | 217 | annotations: {
|
253 |
| - description: '{{ $labels.instance }} tables have not been vacuumed recently, which may lead to performance degradation.', |
| 218 | + description: '{{ $labels.instance }} tables have not been vacuumed recently within the last hour, which may lead to performance degradation.', |
254 | 219 | summary: 'PostgreSQL tables not vacuumed.',
|
255 | 220 | },
|
256 | 221 | expr: |||
|
|
0 commit comments