- description: "Name of the schema that this table is in"
- - relname:
- usage: "LABEL"
- description: "Name of this table"
- - seq_scan:
- usage: "COUNTER"
- description: "Number of sequential scans initiated on this table"
- - seq_tup_read:
- usage: "COUNTER"
- description: "Number of live rows fetched by sequential scans"
- - idx_scan:
- usage: "COUNTER"
- description: "Number of index scans initiated on this table"
- - idx_tup_fetch:
- usage: "COUNTER"
- description: "Number of live rows fetched by index scans"
- - n_tup_ins:
- usage: "COUNTER"
- description: "Number of rows inserted"
- - n_tup_upd:
- usage: "COUNTER"
- description: "Number of rows updated"
- - n_tup_del:
- usage: "COUNTER"
- description: "Number of rows deleted"
- - n_tup_hot_upd:
- usage: "COUNTER"
- description: "Number of rows HOT updated (i.e., with no separate index update required)"
- - n_live_tup:
- usage: "GAUGE"
- description: "Estimated number of live rows"
- - n_dead_tup:
- usage: "GAUGE"
- description: "Estimated number of dead rows"
- - n_mod_since_analyze:
- usage: "GAUGE"
- description: "Estimated number of rows changed since last analyze"
- - last_vacuum:
- usage: "GAUGE"
- description: "Last time at which this table was manually vacuumed (not counting VACUUM FULL)"
- - last_autovacuum:
- usage: "GAUGE"
- description: "Last time at which this table was vacuumed by the autovacuum daemon"
- - last_analyze:
- usage: "GAUGE"
- description: "Last time at which this table was manually analyzed"
- - last_autoanalyze:
- usage: "GAUGE"
- description: "Last time at which this table was analyzed by the autovacuum daemon"
- - vacuum_count:
- usage: "COUNTER"
- description: "Number of times this table has been manually vacuumed (not counting VACUUM FULL)"
- - autovacuum_count:
- usage: "COUNTER"
- description: "Number of times this table has been vacuumed by the autovacuum daemon"
- - analyze_count:
- usage: "COUNTER"
- description: "Number of times this table has been manually analyzed"
- - autoanalyze_count:
- usage: "COUNTER"
- description: "Number of times this table has been analyzed by the autovacuum daemon"
-
-pg_statio_user_tables:
- query: "SELECT current_database() datname, schemaname, relname, heap_blks_read, heap_blks_hit, idx_blks_read, idx_blks_hit, toast_blks_read, toast_blks_hit, tidx_blks_read, tidx_blks_hit FROM pg_statio_user_tables"
- metrics:
- - datname:
- usage: "LABEL"
- description: "Name of current database"
- - schemaname:
- usage: "LABEL"
- description: "Name of the schema that this table is in"
- - relname:
- usage: "LABEL"
- description: "Name of this table"
- - heap_blks_read:
- usage: "COUNTER"
- description: "Number of disk blocks read from this table"
- - heap_blks_hit:
- usage: "COUNTER"
- description: "Number of buffer hits in this table"
- - idx_blks_read:
- usage: "COUNTER"
- description: "Number of disk blocks read from all indexes on this table"
- - idx_blks_hit:
- usage: "COUNTER"
- description: "Number of buffer hits in all indexes on this table"
- - toast_blks_read:
- usage: "COUNTER"
- description: "Number of disk blocks read from this table's TOAST table (if any)"
- - toast_blks_hit:
- usage: "COUNTER"
- description: "Number of buffer hits in this table's TOAST table (if any)"
- - tidx_blks_read:
- usage: "COUNTER"
- description: "Number of disk blocks read from this table's TOAST table indexes (if any)"
- - tidx_blks_hit:
- usage: "COUNTER"
- description: "Number of buffer hits in this table's TOAST table indexes (if any)"
-<% end -%>
-
-pg_unfrozen_ids:
- query: "SELECT current_database() AS datname, max(age(relfrozenxid)) AS xid_age, max(mxid_age(relminmxid)) AS mxid_age FROM pg_class WHERE relkind IN ('r', 'm')"
- metrics:
- - datname:
- usage: "LABEL"
- description: "Name of the database"
- - xid_age:
- usage: "GAUGE"
- description: "Age of the oldest unfrozen transaction ID in this database"
- - mxid_age:
- usage: "GAUGE"
- description: "Age of the oldest unfrozen multixact ID in this database"