Merge pull request #635 from paulfantom/fix-promql

postgres_mixin/alerts: fix incorrect promql aggregation
This commit is contained in:
Ben Kochie 2022-04-23 10:57:27 +02:00 committed by GitHub
commit 0bacea243a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -61,8 +61,8 @@
summary: 'PostgreSQL high number of slow on {{ $labels.cluster }} for database {{ $labels.datname }} ',
},
expr: |||
avg(
rate by (datname) (
avg by (datname) (
rate (
pg_stat_activity_max_tx_duration{datname!~"template.*",%(postgresExporterSelector)s}[2m]
)
) > 2 * 60