Skip to content
This repository was archived by the owner on Nov 28, 2022. It is now read-only.

Add Table size metric #42

Merged
merged 5 commits into from
Jul 17, 2018
Merged

Add Table size metric #42

merged 5 commits into from
Jul 17, 2018

Conversation

diogonicoleti
Copy link
Contributor

Added a new metric to return the total disk space in bytes used by the a table, including all indexes and TOAST data.

Sample output:

# HELP postgresql_table_size_bytes Total disk space in bytes used by the a table, including all indexes and TOAST data
# TYPE postgresql_table_size_bytes gauge
postgresql_table_size_bytes{database_name="postgres",table="mytable",type="index"} 81920
postgresql_table_size_bytes{database_name="postgres",table="mytable",type="table"} 73728
postgresql_table_size_bytes{database_name="postgres",table="mytable",type="toast"} 8192

refs https://github.com/ContaAzul/blackops/issues/1995
@ContaAzul/sre

@diogonicoleti diogonicoleti merged commit 79fa7d7 into master Jul 17, 2018
@diogonicoleti diogonicoleti deleted the table-size branch July 17, 2018 11:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants