Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Showing total of all database sizes in a namespace in dashboard for "Database Size" #19

Open
ramithect opened this issue Sep 25, 2024 · 0 comments

Comments

@ramithect
Copy link

The problem is in the dashboard "Database Size" is calculated by this query:

cnpg_pg_database_size_bytes{namespace="$namespace"}

and the calculation is on "Total" so it will sum up the size of all databases in that namespace
Ex.
If I have 2 databases in test namespace with 400GB and 600GB size in the dashboard it will show 1TB for both databases

I've changed it to the query below to solve the problem:
cnpg_pg_database_size_bytes{namespace="$namespace", job="$namespace/$cluster"}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant