Add support for optional namespace caching. (#319)
In the user queries.yml file, the created namespaces can now be optionally cached by setting cache_seconds, which will prevent the query being re-run within that timeframe if previous results are available. Supercedes #211, credit to @SamSaffron for the original PR.
This commit is contained in:
@@ -114,7 +114,8 @@ pg_statio_user_tables:
|
||||
description: "Number of buffer hits in this table's TOAST table indexes (if any)"
|
||||
|
||||
pg_database:
|
||||
query: " SELECT pg_database.datname, pg_database_size(pg_database.datname) as size FROM pg_database"
|
||||
query: "SELECT pg_database.datname, pg_database_size(pg_database.datname) as size FROM pg_database"
|
||||
cache_seconds: 30
|
||||
metrics:
|
||||
- datname:
|
||||
usage: "LABEL"
|
||||
|
||||
Reference in New Issue
Block a user