Skip to content

Instantly share code, notes, and snippets.

@adivinho
Created March 31, 2020 12:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adivinho/6e6b938f276932b867fb44b8e007df65 to your computer and use it in GitHub Desktop.
Save adivinho/6e6b938f276932b867fb44b8e007df65 to your computer and use it in GitHub Desktop.
## Custom query
pg_database_size:
query: "SELECT pg_database.datname as datname, pg_database_size(pg_database.datname) AS bytes FROM pg_database"
metrics:
- datname:
usage: "LABEL"
description: "Name of the database that this table is in"
- bytes:
usage: "GAUGE"
description: "Total disk space in bytes used by the specified database"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment