Created
September 26, 2019 11:33
-
-
Save munisystem/18bce9f7a566dd75e6774dcc25e48d14 to your computer and use it in GitHub Desktop.
A configuration file of wrouesnel/postgres_exporter for collecting each table size
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pg_class: | |
query: "SELECT n.nspname as schema, c.relname as relname, (c.relpages * 8192) as relsize_bytes FROM pg_catalog.pg_class c LEFT JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace WHERE c.relkind IN ('r','') AND n.nspname <> 'pg_catalog' AND n.nspname <> 'information_schema' AND n.nspname !~ '^pg_toast' AND pg_catalog.pg_table_is_visible(c.oid);" | |
metrics: | |
- schema: | |
usage: "LABEL" | |
description: "Schema of this table" | |
- relname: | |
usage: "LABEL" | |
description: "Name of this table" | |
- relsize_bytes: | |
usage: "GAUGE" | |
description: "Size of this table" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment