You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
desc: PostgreSQL Database, WAL, Log size since v10
query: |-
SELECT datname, pg_database_size(oid) AS bytes FROM pg_database
UNION ALL SELECT 'log', CASE WHEN current_setting('logging_collector') = 'on' THEN COALESCE((SELECT SUM(size) FROM pg_catalog.pg_ls_logdir()), 0) ELSE 0 END
UNION ALL SELECT 'wal', COALESCE((SELECT SUM(size) FROM pg_catalog.pg_ls_waldir()), 0);
ttl: 60
timeout: 1
min_version: 100000
tags: [ cluster ]
metrics:
- datname: { usage: LABEL ,description: "Database name, or special category wal, or log" }