Open leweafan opened 1 year ago
You can get database size using sql module:
- module: sql
metricsets:
- query
period: 300s
hosts: ["postgres://username:password@127.0.0.1:5432/postgres?sslmode=disable"]
driver: "postgres"
sql_query: "SELECT pg_database.datname as pg_database_name, pg_database_size(pg_database.datname) as pg_database_size FROM pg_database;"
sql_response_format: table
Two fields will be created:
You should add mapping for these fields to your template.
Hi! We just realized that we haven't looked into this issue in a while. We're sorry!
We're labeling this issue as Stale
to make it hit our filters and make sure we get back to it as soon as possible. In the meantime, it'd be extremely helpful if you could take a look at it as well and confirm its relevance. A simple comment with a nice emoji will be enough :+1
.
Thank you for your contribution!
Describe the enhancement:
Currently I can not get from postgresql module database size and use SQL module and the following request
Describe a specific use case for the enhancement or feature:
Database size is important metric and should be added to postgresql module.