diff --git a/dist/rules/postgresql/postgres-exporter.yml b/dist/rules/postgresql/postgres-exporter.yml index ea35c7c..0b8cd0a 100644 --- a/dist/rules/postgresql/postgres-exporter.yml +++ b/dist/rules/postgresql/postgres-exporter.yml @@ -31,15 +31,6 @@ groups: summary: Postgresql exporter error (instance {{ $labels.instance }}) description: "Postgresql exporter is showing errors. A query may be buggy in query.yaml\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - - alert: PostgresqlReplicationLag - expr: 'pg_replication_lag > 30 and ON(instance) pg_replication_is_replica == 1' - for: 0m - labels: - severity: critical - annotations: - summary: Postgresql replication lag (instance {{ $labels.instance }}) - description: "PostgreSQL replication lag is going up (> 30s)\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - - alert: PostgresqlTableNotAutoVacuumed expr: '(pg_stat_user_tables_last_autovacuum > 0) and (time() - pg_stat_user_tables_last_autovacuum) > 60 * 60 * 24 * 10' for: 0m @@ -140,7 +131,7 @@ groups: description: "Unused Replication Slots\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - alert: PostgresqlTooManyDeadTuples - expr: '((pg_stat_user_tables_n_dead_tup > 10000) / (pg_stat_user_tables_n_live_tup + pg_stat_user_tables_n_dead_tup)) >= 0.1 unless ON(instance) (pg_replication_is_replica == 1)' + expr: '((pg_stat_user_tables_n_dead_tup > 10000) / (pg_stat_user_tables_n_live_tup + pg_stat_user_tables_n_dead_tup)) >= 0.1' for: 2m labels: severity: warning @@ -148,24 +139,6 @@ groups: summary: Postgresql too many dead tuples (instance {{ $labels.instance }}) description: "PostgreSQL dead tuples is too large\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - - alert: PostgresqlSplitBrain - expr: 'count(pg_replication_is_replica == 0) != 1' - for: 0m - labels: - severity: critical - annotations: - summary: Postgresql split brain (instance {{ $labels.instance }}) - description: "Split Brain, too many primary Postgresql databases in read-write mode\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - - - alert: PostgresqlPromotedNode - expr: 'pg_replication_is_replica and changes(pg_replication_is_replica[1m]) > 0' - for: 0m - labels: - severity: warning - annotations: - summary: Postgresql promoted node (instance {{ $labels.instance }}) - description: "Postgresql standby server has been promoted as primary node\n VALUE = {{ $value }}\n LABELS = {{ $labels }}" - - alert: PostgresqlConfigurationChanged expr: '{__name__=~"pg_settings_.*"} != ON(__name__) {__name__=~"pg_settings_([^t]|t[^r]|tr[^a]|tra[^n]|tran[^s]|trans[^a]|transa[^c]|transac[^t]|transact[^i]|transacti[^o]|transactio[^n]|transaction[^_]|transaction_[^r]|transaction_r[^e]|transaction_re[^a]|transaction_rea[^d]|transaction_read[^_]|transaction_read_[^o]|transaction_read_o[^n]|transaction_read_on[^l]|transaction_read_onl[^y]).*"} OFFSET 5m' for: 0m