fix(monitoring): correct postgres configuration change query

changes() produced one series per pg_settings_* metric with identical labels,
so VictoriaMetrics rejected the rule with "duplicate output timeseries" whenever
a setting changed.

Assisted-by: DeepSeek Harness (deepseek-flash)
This commit is contained in:
Ryan Yin authored and ryan4yin | 二花 committed 2026-10-17 19:21:22 +08:00
1 parent 1c8ce967ae
commit e75231dc28
1 file changed
+2 -2
@@ -176,8 +176,8 @@ groups:
- alert: PostgresqlConfigurationChanged
expr:
'changes({__name__=~"pg_settings_.*", __name__!="pg_settings_transaction_read_only"}[5m])
> 0'
'sum(changes({__name__=~"pg_settings_.*",
__name__!="pg_settings_transaction_read_only"}[5m])) > 0'
for: 0m
labels:
severity: info