Sample for database size (#76)

This commit is contained in:
Giancarlo Rubio 2017-07-26 14:53:16 +02:00 committed by Will Rouesnel
parent 81194c9219
commit 1afbd62ab1
1 changed files with 10 additions and 0 deletions

View File

@ -78,3 +78,13 @@ pg_stat_user_tables:
- autoanalyze_count:
usage: "COUNTER"
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"