mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-03-02 09:20:37 +00:00
Provide more helpful default values for tables that have never been vacuumed (#310)
Returning a (long gone) timestamp does the right thing for alerting PromQL queries ("alert if older than"), while `NaN` is rather intractable.
This commit is contained in:
parent
043e68e067
commit
b33c2f9349
@ -13,7 +13,7 @@ pg_postmaster:
|
||||
description: "Time at which postmaster started"
|
||||
|
||||
pg_stat_user_tables:
|
||||
query: "SELECT schemaname, relname, seq_scan, seq_tup_read, idx_scan, idx_tup_fetch, n_tup_ins, n_tup_upd, n_tup_del, n_tup_hot_upd, n_live_tup, n_dead_tup, n_mod_since_analyze, last_vacuum, last_autovacuum, last_analyze, last_autoanalyze, vacuum_count, autovacuum_count, analyze_count, autoanalyze_count FROM pg_stat_user_tables"
|
||||
query: "SELECT schemaname, relname, seq_scan, seq_tup_read, idx_scan, idx_tup_fetch, n_tup_ins, n_tup_upd, n_tup_del, n_tup_hot_upd, n_live_tup, n_dead_tup, n_mod_since_analyze, COALESCE(last_vacuum, '1970-01-01Z'), COALESCE(last_vacuum, '1970-01-01Z') as last_vacuum, COALESCE(last_autovacuum, '1970-01-01Z') as last_autovacuum, COALESCE(last_analyze, '1970-01-01Z') as last_analyze, COALESCE(last_autoanalyze, '1970-01-01Z') as last_autoanalyze, vacuum_count, autovacuum_count, analyze_count, autoanalyze_count FROM pg_stat_user_tables"
|
||||
metrics:
|
||||
- schemaname:
|
||||
usage: "LABEL"
|
||||
|
Loading…
Reference in New Issue
Block a user