mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-02-16 10:37:16 +00:00
postgres_mixin/alerts: fix incorrect promql aggregation
Signed-off-by: Paweł Krupa (paulfantom) <pawel@krupa.net.pl>
This commit is contained in:
parent
92bdb8755d
commit
db429bd4b1
@ -61,8 +61,8 @@
|
|||||||
summary: 'PostgreSQL high number of slow on {{ $labels.cluster }} for database {{ $labels.datname }} ',
|
summary: 'PostgreSQL high number of slow on {{ $labels.cluster }} for database {{ $labels.datname }} ',
|
||||||
},
|
},
|
||||||
expr: |||
|
expr: |||
|
||||||
avg(
|
avg by (datname) (
|
||||||
rate by (datname) (
|
rate (
|
||||||
pg_stat_activity_max_tx_duration{datname!~"template.*",%(postgresExporterSelector)s}[2m]
|
pg_stat_activity_max_tx_duration{datname!~"template.*",%(postgresExporterSelector)s}[2m]
|
||||||
)
|
)
|
||||||
) > 2 * 60
|
) > 2 * 60
|
||||||
|
Loading…
Reference in New Issue
Block a user