Skip to content

Commit 2d554de

Browse files
author
Muhammad Shahzeb
committed
Remove alerts that use outdated metrics; update description
1 parent cc5c1f4 commit 2d554de

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

postgres_mixin/alerts/postgres.libsonnet

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,6 @@
189189
severity: 'critical',
190190
},
191191
},
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-
},
204192
{
205193
alert: 'PostgresReplicationRoleChanged',
206194
annotations: {
@@ -224,33 +212,10 @@
224212
severity: 'critical',
225213
},
226214
},
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-
},
250215
{
251216
alert: 'PostgresTablesNotVaccumed',
252217
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.',
254219
summary: 'PostgreSQL tables not vacuumed.',
255220
},
256221
expr: |||

0 commit comments

Comments
 (0)