mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-21 22:45:26 +00:00
Sample for database size (#76)
This commit is contained in:
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"
|
||||||
|
Loading…
Reference in New Issue
Block a user