You've already forked postgres_exporter
mirror of
https://github.com/prometheus-community/postgres_exporter.git
synced 2025-08-09 15:42:47 +03:00
Sample for database size (#76)
This commit is contained in:
committed by
Will Rouesnel
parent
81194c9219
commit
1afbd62ab1
10
queries.yaml
10
queries.yaml
@@ -78,3 +78,13 @@ pg_stat_user_tables:
|
|||||||
- autoanalyze_count:
|
- autoanalyze_count:
|
||||||
usage: "COUNTER"
|
usage: "COUNTER"
|
||||||
description: "Number of times this table has been analyzed by the autovacuum daemon"
|
description: "Number of times this table has been analyzed by the autovacuum daemon"
|
||||||
|
|
||||||
|
pg_database:
|
||||||
|
query: " SELECT pg_database.datname, pg_database_size(pg_database.datname) as size FROM pg_database"
|
||||||
|
metrics:
|
||||||
|
- datname:
|
||||||
|
usage: "LABEL"
|
||||||
|
description: "Name of the database"
|
||||||
|
- size:
|
||||||
|
usage: "GAUGE"
|
||||||
|
description: "Disk space used by the database"
|
||||||
|
Reference in New Issue
Block a user