fix: change pg expr grater rules

This commit is contained in:
baerwang 2023-07-14 15:05:14 +08:00
parent 68d45a0856
commit 68e05d61ca
2 changed files with 2 additions and 2 deletions

View file

@ -620,7 +620,7 @@ groups:
for: 2m
- name: Postgresql not enough connections
description: PostgreSQL instance should have more connections (> 5)
query: 'sum by (datname) (pg_stat_activity_count{datname!~"template.*|postgres"}) < 5'
query: 'sum by (datname) (pg_stat_activity_count{datname!~"template.*|postgres"}) > 5'
severity: warning
for: 2m
- name: Postgresql dead locks

View file

@ -59,7 +59,7 @@ groups:
description: "PostgreSQL instance has too many connections (> 80%).\n VALUE = {{ $value }}\n LABELS = {{ $labels }}"
- alert: PostgresqlNotEnoughConnections
expr: 'sum by (datname) (pg_stat_activity_count{datname!~"template.*|postgres"}) < 5'
expr: 'sum by (datname) (pg_stat_activity_count{datname!~"template.*|postgres"}) > 5'
for: 2m
labels:
severity: warning