Version info: Version: 6.1.0 Config Schema: 00824 Sink Schema: 01614 Git Commit: 742aaf91551df5d65cce2423c32e6fd8b3cdd9cc Built: 2026-11-04T07:53:54Z Usage: pgwatch [OPTIONS] [config | metric | source] Sources: -s, --sources= Postgres URI, file or folder of YAML files containing info on which DBs to monitor [$PW_SOURCES] --refresh= How frequently to resync sources and metrics (default: 120) [$PW_REFRESH] -g, --group= Groups for filtering which databases to monitor. By default all are monitored [$PW_GROUP] --min-db-size-mb= Smaller size DBs will be ignored and not monitored until they reach the threshold. (default: 0) [$PW_MIN_DB_SIZE_MB] --max-parallel-connections-per-db= Max parallel metric fetches per DB. Note the multiplication effect on multi-DB instances (default: 4) [$PW_MAX_PARALLEL_CONNECTIONS_PER_DB] --try-create-listed-exts-if-missing= Try creating the listed extensions (comma sep.) on first connect for all monitored DBs when missing. Main usage - pg_stat_statements [$PW_TRY_CREATE_LISTED_EXTS_IF_MISSI- NG] --create-helpers Create helper database objects from metric definitions [$PW_CREATE_HELPERS] Metrics: -m, --metrics= Postgres URI or path to YAML file with metrics definitions [$PW_METRICS] --instance-level-cache-max-seconds= Max allowed staleness for instance level metric data shared between DBs of an instance. Set to 0 to disable (default: 30) [$PW_INSTANCE_LEVEL_CACHE_MAX_SECOND- S] --emergency-pause-triggerfile= When the file exists no metrics will be temporarily fetched (default: /tmp/pgwatch-emergency-pause) [$PW_EMERGENCY_PAUSE_TRIGGERFILE] Sinks: --sink= URI where metrics will be stored, can be used multiple times [$PW_SINK] --batching-delay= Sink-specific batching flush delay; may be ignored by some sinks (default: 950ms) [$PW_BATCHING_DELAY] --partition-interval= Time range for PostgreSQL sink time partitions. Must be a valid PostgreSQL interval. (default: 1 day) [$PW_PARTITION_INTERVAL] --retention= Delete metrics older than this. Must be a valid PostgreSQL interval. (default: 14 days) [$PW_RETENTION] --maintenance-interval= Run pgwatch maintenance tasks on sinks with this interval e.g., deleting old metrics; Set to zero to disable. Must be a valid PostgreSQL interval. (default: 12 hours) [$PW_MAINTENANCE_INTERVAL] --real-dbname-field= Tag key for real database name (default: real_dbname) [$PW_REAL_DBNAME_FIELD] --system-identifier-field= Tag key for system identifier value (default: sys_id) [$PW_SYSTEM_IDENTIFIER_FIELD] Logging: -v, --log-level=[debug|info|error] Verbosity level for stdout and log file (default: info) --log-file= File name to store logs --log-file-format=[json|text] Format of file logs (default: json) --log-file-rotate Rotate log files --log-file-size= Maximum size in MB of the log file before it gets rotated (default: 100) --log-file-age= Number of days to retain old log files, 0 means forever (default: 0) --log-file-number= Maximum number of old log files to retain, 0 to retain all (default: 0) WebUI: --web-disable=[all|ui] Disable REST API and/or web UI [$PW_WEBDISABLE] --web-addr= TCP address in the form 'host:port' to listen on (default: :8080) [$PW_WEBADDR] --web-base-path= Base path for web UI and API endpoints (e.g., 'pgwatch' for reverse proxy setups) [$PW_WEBBASEPATH] --web-user= Admin username [$PW_WEBUSER] --web-password= Admin password [$PW_WEBPASSWORD] Help Options: -h, --help Show this help message Available commands: config Manage configurations metric Manage metrics source Manage sources