pgagroal-cli [ -c CONFIG_FILE ] [ COMMAND ]
pgagroal-cli is a command line utility for pgagroal.
- flush [mode]
[database]
- Flush connections according to [mode]. Allowed modes are:
- 'gracefully' (default) to flush all connections gracefully
- 'idle' to flush only idle connections
- 'all' to flush all connections. USE WITH CAUTION!
If no [database] name is specified, applies to all databases.
- ping
- Verifies if pgagroal is up and running and checks connectivity to
configured PostgreSQL servers. With JSON output, the response includes
per-server Host, Port, Status, Primary, and Behind on
standbys.
- enable
[database]
- Enable the specified database, or all databases if not specified
- disable
[database]
- Disable the specified database, or all databases if not specified
- shutdown
[mode]
- Stops pgagroal pooler.
The [mode] can be:
- 'gracefully' (default): waits for active connections to quit
- 'immediate': forces connections to close and terminate
- 'cancel': avoid a previously issued 'shutdown gracefully'
- status
[details]
- Status of pgagroal, with optional details. Per-server fields match
ping. details adds limits and per-connection rows.
- switch-to
<server>
- Switches to the specified primary server
- conf
<action>
- Manages the
configuration. <action> can be:
- 'reload': issue a configuration reload
- 'ls': list the configuration files used
- 'get': obtain information about a runtime configuration value Usage: conf
get <parameter_name>
- 'set': modify a configuration value Usage: conf set <parameter_name>
<parameter_value>
- clear
<what>
- Resets either the Prometheus statistics or the specified server.
<what> can be:
- 'server' (default) followed by a server name
- a server name on its own
- 'prometheus' to reset the Prometheus metrics
pgagroal is licensed under the 3-clause BSD License.