4.15. Метрики использования таблиц #
Метрики на основе представлений pg_stat_all_tables, pg_statio_all_tables и pg_tables, собираемые следующими плагинами:
плагином tables_size:
postgresql.tables.size_bytes{database, schema, table}postgresql.tables.heap_size_bytes{database, schema, table}postgresql.tables.toast_size_bytes{database, schema, table}
плагином tables:
postgresql.tables.seq_scan{database, schema, table}postgresql.tables.seq_tuples_fetch{database, schema, table}postgresql.tables.index_scan{database, schema, table}postgresql.tables.index_tuples_fetch{database, schema, table}postgresql.tables.tuples_dead{database, schema, table}postgresql.tables.tuples_deleted{database, schema, table}postgresql.tables.tuples_hot_updated{database, schema, table}postgresql.tables.tuples_inserted_since_vacuum{database, schema, table}postgresql.tables.tuples_inserted{database, schema, table}postgresql.tables.tuples_live{database, schema, table}postgresql.tables.tuples_modified_since_analyze{database, schema, table}postgresql.tables.tuples_updated{database, schema, table}
плагином tables_vacuum:
postgresql.tables.vacuum_count{database, schema, table}postgresql.tables.last_vacuum_time_unixtime{database, schema, table}postgresql.tables.autovacuum_count{database, schema, table}postgresql.tables.last_autovacuum_time_unixtime{database, schema, table}postgresql.tables.analyze_count{database, schema, table}postgresql.tables.last_analyze_time_unixtime{database, schema, table}postgresql.tables.autoanalyze_count{database, schema, table}postgresql.tables.last_autoanalyze_time_unixtime{database, schema, table}доступные в Postgres Pro и PostgreSQL версии 18 и выше:
postgresql.tables.total_autoanalyze_time_milliseconds{database, schema, table}postgresql.tables.total_autovacuum_time_milliseconds{database, schema, table}postgresql.tables.total_analyze_time_milliseconds{database, schema, table}postgresql.tables.total_vacuum_time_milliseconds{database, schema, table}
плагином tables_io:
postgresql.tables.heap_blocks_read{database, schema, table}postgresql.tables.heap_blocks_hit{database, schema, table}postgresql.tables.index_blocks_read{database, schema, table}postgresql.tables.index_blocks_hit{database, schema, table}postgresql.tables.toast_heap_blocks_read{database, schema, table}postgresql.tables.toast_heap_blocks_hit{database, schema, table}postgresql.tables.toast_index_blocks_hit{database, schema, table}postgresql.tables.toast_index_blocks_read{database, schema, table}