-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Add the following new monitoring features to the postgreslet helmchart:
Slow queries global stats
Metric code see #56
User table size stats
query: "SELECT current_database() datname, pgn.nspname schemaname, pgc.relname, CAST(pgc.reltuples AS BIGINT) table_rows, pg_total_relation_size(pgc.oid) disk_usage_table_bytes, pg_indexes_size(pgc.oid) disk_usage_index_bytes, COALESCE(pg_total_relation_size(pgc.reltoastrelid), 0) disk_usage_toast_bytes FROM pg_class pgc JOIN pg_namespace pgn ON pgc.relnamespace = pgn.oid"
metrics:
- datname:
usage: "LABEL"
description: "Name of the database that this table is in"
- schemaname:
usage: "LABEL"
description: "Name of the schema that this table is in"
- relname:
usage: "LABEL"
description: "Name of the table, index, view, etc."
- table_rows:
usage: "GAUGE"
decription: "Number of rows in the table. This is only an estimate used by the planner. It is updated by VACUUM, ANALYZE, and a few DDL commands such as CREATE INDEX"
- disk_usage_table_bytes:
usage: "GAUGE"
description: "Total disk space used by the specified table, including all indexes and TOAST data"
- disk_usage_index_bytes:
usage: "GAUGE"
description: "Total disk space used by indexes attached to the specified table"
- disk_usage_toast_bytes:
usage: "GAUGE"
description: "Total disk space used by TOAST data attached to the specified table"Enable the possibility to turn on postgres exporter auto database discovery
The following environment variables need to be added:
PG_EXPORTER_AUTO_DISCOVER_DATABASES
PG_EXPORTER_EXCLUDE_DATABASES
PG_EXPORTER_INCLUDE_DATABASES
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
No status