Postgresql table not auto vacuumed warning
>>>
((
pg_stat_user_tables_n_tup_del
+
pg_stat_user_tables_n_tup_upd
+
pg_stat_user_tables_n_tup_hot_upd
) >
pg_settings_autovacuum_vacuum_threshold
) and (
time
() -
pg_stat_user_tables_last_autovacuum
) > 60 * 60 * 24 * 10
The rule adds the deleted, updated, and HOT‑updated row counts for each user table (pg_stat_user_tables_n_tup_del + pg_stat_user_tables_n_tup_upd + pg_stat_user_tables_n_tup_hot_upd) and checks if this total exceeds the configured autovacuum vacuum threshold (pg_settings_autovacuum_vacuum_threshold). If that condition is true and the time since the table’s last autovacuum (time() - pg_stat_user_tables_last_autovacuum) is greater than 10 days (60 * 60 * 24 * 10 seconds), the alert fires.
Exporters Used
Related Alerts
PostgreSQLCacheHitRatio
PostgreSQLDown
PostgreSQLHighConnections
PostgreSQLMaxConnectionsReached
PostgreSQLQPS
PostgreSQLSlowQueries
Postgresql SSL compression active
Postgresql bloat index high (> 80%)
Postgresql bloat table high (> 80%)
Postgresql commit rate low
Postgresql configuration changed
Postgresql dead locks
Postgresql down
Postgresql exporter error
Postgresql high rate deadlock
Postgresql high rate statement timeout
Postgresql high rollback rate
Postgresql invalid index
Postgresql low XID consumption
Postgresql not enough connections
Postgresql replication lag
Postgresql restarted
Postgresql table not auto analyzed
Postgresql too many connections
Postgresql too many dead tuples
Postgresql too many locks acquired
Postgresql unused replication slot