add namespace to alerts
This commit is contained in:
@@ -7,7 +7,7 @@ annotations:
|
|||||||
Pod {{`{{`}} $labels.pod {{`}}`}}
|
Pod {{`{{`}} $labels.pod {{`}}`}}
|
||||||
has been waiting for longer than 5 minutes
|
has been waiting for longer than 5 minutes
|
||||||
expr: |
|
expr: |
|
||||||
cnpg_backends_waiting_total > 300
|
cnpg_backends_waiting_total{namespace="{{ .namespace }}"} > 300
|
||||||
for: 1m
|
for: 1m
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ annotations:
|
|||||||
There are over 10 deadlock conflicts in
|
There are over 10 deadlock conflicts in
|
||||||
{{`{{`}} $labels.pod {{`}}`}}
|
{{`{{`}} $labels.pod {{`}}`}}
|
||||||
expr: |
|
expr: |
|
||||||
cnpg_pg_stat_database_deadlocks > 10
|
cnpg_pg_stat_database_deadlocks{namespace="{{ .namespace }}"} > 10
|
||||||
for: 1m
|
for: 1m
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ annotations:
|
|||||||
description: |-
|
description: |-
|
||||||
Archiving failed for {{`{{`}} $labels.pod {{`}}`}}
|
Archiving failed for {{`{{`}} $labels.pod {{`}}`}}
|
||||||
expr: |
|
expr: |
|
||||||
(cnpg_pg_stat_archiver_last_failed_time - cnpg_pg_stat_archiver_last_archived_time) > 2
|
(cnpg_pg_stat_archiver_last_failed_time{namespace="{{ .namespace }}"} - cnpg_pg_stat_archiver_last_archived_time{namespace="{{ .namespace }}"}) > 2
|
||||||
for: 1m
|
for: 1m
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ annotations:
|
|||||||
CloudNativePG Cluster Pod {{`{{`}} $labels.pod {{`}}`}}
|
CloudNativePG Cluster Pod {{`{{`}} $labels.pod {{`}}`}}
|
||||||
is taking more than 5 minutes (300 seconds) for a query.
|
is taking more than 5 minutes (300 seconds) for a query.
|
||||||
expr: |-
|
expr: |-
|
||||||
cnpg_backends_max_tx_duration_seconds > 300
|
cnpg_backends_max_tx_duration_seconds{namespace="{{ .namespace }}"} > 300
|
||||||
for: 1m
|
for: 1m
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ annotations:
|
|||||||
Over 300,000,000 transactions from frozen xid
|
Over 300,000,000 transactions from frozen xid
|
||||||
on pod {{`{{`}} $labels.pod {{`}}`}}
|
on pod {{`{{`}} $labels.pod {{`}}`}}
|
||||||
expr: |
|
expr: |
|
||||||
cnpg_pg_database_xid_age > 300000000
|
cnpg_pg_database_xid_age{namespace="{{ .namespace }}"} > 300000000
|
||||||
for: 1m
|
for: 1m
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ annotations:
|
|||||||
Replica {{`{{`}} $labels.pod {{`}}`}}
|
Replica {{`{{`}} $labels.pod {{`}}`}}
|
||||||
is failing to replicate
|
is failing to replicate
|
||||||
expr: |
|
expr: |
|
||||||
cnpg_pg_replication_in_recovery > cnpg_pg_replication_is_wal_receiver_up
|
cnpg_pg_replication_in_recovery{namespace="{{ .namespace }}"} > cnpg_pg_replication_is_wal_receiver_up{namespace="{{ .namespace }}"}
|
||||||
for: 1m
|
for: 1m
|
||||||
labels:
|
labels:
|
||||||
severity: warning
|
severity: warning
|
||||||
|
|||||||
Reference in New Issue
Block a user