pgexporter-cli
pgexporter-cli
exists to control pgexporter
, especially when pgexporter
is running as a daemon.
Usage:
pgexporter-cli -c <config-file> [options] [command]
pgexporter-cli -h <host> -p <port> [options] [command]
pgexporter-cli -?
pgexporter-cli -V
pgexporter-cli -c <config-file> [options] [command]
pgexporter-cli -h <host> -p <port> [options] [command]
pgexporter-cli -?
pgexporter-cli -V
Commands:
is-alive
: Check ifpgexporter
is alive.stop
: Stoppgexporter
.status
: Status ofpgexporter
.details
: Alias forstatus
.reload
: Reload the configuration.
NOTE
The notation standard used for describing usage can be found here.
Meta Options
Help
$ pgexporter-cli --help
$ pgexporter-cli --help
pgexporter-cli 0.5.0
Command line utility for pgexporter
USAGE:
pgexporter-cli -c <config-file> [options] <command>
pgexporter-cli -h <host> -p <port> [options] <command>
pgexporter-cli -?
pgexporter-cli -V
OPTIONS:
-c, --config <config-file> Set the path to the pgexporter.conf file [default: /etc/pgexporter/pgexporter.conf]
-h, --host <host> Set the host name
-p, --port <port> Set the port number
-U, --user <username> Set the user name
-P, --password <password> Set the password
-L, --logfile <file> Set the log file
-v, --verbose Output text string of result
-?, --help Display help
-V, --version Display version information
COMMANDS:
is-alive Is pgexporter alive
stop Stop pgexporter
status Status of pgexporter
details Alias for `status`
reload Reload the configuration
reset Reset the Prometheus statistics
pgexporter: https://pgexporter.github.io/
Report bugs: https://github.com/pgexporter/pgexporter/issues
pgexporter-cli 0.5.0
Command line utility for pgexporter
USAGE:
pgexporter-cli -c <config-file> [options] <command>
pgexporter-cli -h <host> -p <port> [options] <command>
pgexporter-cli -?
pgexporter-cli -V
OPTIONS:
-c, --config <config-file> Set the path to the pgexporter.conf file [default: /etc/pgexporter/pgexporter.conf]
-h, --host <host> Set the host name
-p, --port <port> Set the port number
-U, --user <username> Set the user name
-P, --password <password> Set the password
-L, --logfile <file> Set the log file
-v, --verbose Output text string of result
-?, --help Display help
-V, --version Display version information
COMMANDS:
is-alive Is pgexporter alive
stop Stop pgexporter
status Status of pgexporter
details Alias for `status`
reload Reload the configuration
reset Reset the Prometheus statistics
pgexporter: https://pgexporter.github.io/
Report bugs: https://github.com/pgexporter/pgexporter/issues
Version
$ pgexporter-cli --version
# or
$ pgexporter-cli -V
$ pgexporter-cli --version
# or
$ pgexporter-cli -V
pgexporter-cli 0.5.0
pgexporter-cli 0.5.0
Commands
is-alive
Description: Checks if pgexporter
is successfully running.
NOTE
It needs verbose
flag to output anything.
$ pgexporter-cli is-alive # -c <config-file> [options] --verbose
# or
$ pgexporter-cli is-alive # -h <host> -p port [options] --verbose
$ pgexporter-cli is-alive # -c <config-file> [options] --verbose
# or
$ pgexporter-cli is-alive # -h <host> -p port [options] --verbose
pgexporter is running.
pgexporter is running.
pgexporter is not running.
pgexporter is not running.
stop
Description: Stop pgexporter
.
$ pgexporter-cli stop # -c <config-file> [options]
# or
$ pgexporter-cli stop # -h <host> -p port [options]
$ pgexporter-cli stop # -c <config-file> [options]
# or
$ pgexporter-cli stop # -h <host> -p port [options]
status
Description: Provides status of the servers pgexporter
is listening to for metrics.
$ pgexporter-cli status # -c <config-file> [options]
# or
$ pgexporter-cli status # -h <host> -p port [options]
$ pgexporter-cli status # -c <config-file> [options]
# or
$ pgexporter-cli status # -h <host> -p port [options]
Number of servers: 8
Server : own
Active : Yes
Server : v10
Active : No
Server : v11
Active : No
Server : v12
Active : No
Server : v13
Active : Yes
Server : v14
Active : No
Server : v15
Active : Yes
Server : v16beta2
Active : No
Number of servers: 8
Server : own
Active : Yes
Server : v10
Active : No
Server : v11
Active : No
Server : v12
Active : No
Server : v13
Active : Yes
Server : v14
Active : No
Server : v15
Active : Yes
Server : v16beta2
Active : No
details
Description: See status.
$ pgexporter-cli details # -c <config-file> [options]
# or
$ pgexporter-cli details # -h <host> -p port [options]
$ pgexporter-cli details # -c <config-file> [options]
# or
$ pgexporter-cli details # -h <host> -p port [options]
Number of servers: 8
Server : own
Active : Yes
Server : v10
Active : No
Server : v11
Active : No
Server : v12
Active : No
Server : v13
Active : Yes
Server : v14
Active : No
Server : v15
Active : Yes
Server : v16beta2
Active : No
Number of servers: 8
Server : own
Active : Yes
Server : v10
Active : No
Server : v11
Active : No
Server : v12
Active : No
Server : v13
Active : Yes
Server : v14
Active : No
Server : v15
Active : Yes
Server : v16beta2
Active : No
reload
Description: Reload the configuration of pgexporter
(in case of changes).
$ pgexporter-cli reload # -c <config-file> [options]
$ pgexporter-cli reload # -c <config-file> [options]
WARNING
reload
can only be done in local connections.
Options
Config File
Description:
Specify the pgexporter.conf
file.
$ pgexporter-cli -c <path-of-config-file> # [options] [command]
# or
$ pgexporter-cli --config <path-of-config-file> # [options] [command]
$ pgexporter-cli -c <path-of-config-file> # [options] [command]
# or
$ pgexporter-cli --config <path-of-config-file> # [options] [command]
# Assuming path to config is ./pgexporter.conf
$ pgexporter-cli -c ./pgexporter.conf # [options] [command]
# Assuming path to config is ./pgexporter.conf
$ pgexporter-cli -c ./pgexporter.conf # [options] [command]
Host
Description:
Specify the host of pgexporter
.
$ pgexporter-cli -h <host> # -p <port> [options] [command]
# or
$ pgexporter-cli --host <host> # -p <port> [options] [command]
$ pgexporter-cli -h <host> # -p <port> [options] [command]
# or
$ pgexporter-cli --host <host> # -p <port> [options] [command]
# Assuming host is localhost
$ pgexporter-cli -h localhost # -p <port> [options] [command]
# or
# Assuming host is 127.0.0.1
$ pgexporter-cli -h 127.0.0.1 # -p <port> [options] [command]
# Assuming host is localhost
$ pgexporter-cli -h localhost # -p <port> [options] [command]
# or
# Assuming host is 127.0.0.1
$ pgexporter-cli -h 127.0.0.1 # -p <port> [options] [command]
Port
Description:
Speicfy the port of pgexporter
.
$ pgexporter-cli -p <port> # -h <host> [options] [command]
# or
$ pgexporter-cli --port <port> # -h <host> [options] [command]
$ pgexporter-cli -p <port> # -h <host> [options] [command]
# or
$ pgexporter-cli --port <port> # -h <host> [options] [command]
# Assuming port is 8080
$ pgexporter-cli -p 8080 # -h <host> [options] [command]
# Assuming port is 8080
$ pgexporter-cli -p 8080 # -h <host> [options] [command]
NOTE
The port
mentioned here is the port at which management is open.
Username
Description:
Username of the user trying to interact with pgexporter
.
$ pgexporter-cli -U <username> # -P <password> [options] [command]
# or
$ pgexporter-cli --user <username> # -P <password> [options] [command]
$ pgexporter-cli -U <username> # -P <password> [options] [command]
# or
$ pgexporter-cli --user <username> # -P <password> [options] [command]
$ pgexporter-cli -U pgexporter # -P <password> [options] [command]
$ pgexporter-cli -U pgexporter # -P <password> [options] [command]
NOTE
If you do not provide your credentials in the arguments, you will be prompted to provide them later.
NOTE
Steps for registering a username and password to access pgexporter
through pgexporter-cli
can be viewed here.
Password
Description:
Password of the user trying to interact with pgexporter
.
$ pgexporter-cli -P <password> # -U <username> [options] [command]
# or
$ pgexporter-cli --password <password> # --user <username> [options] [command]
$ pgexporter-cli -P <password> # -U <username> [options] [command]
# or
$ pgexporter-cli --password <password> # --user <username> [options] [command]
$ pgexporter-cli -P pgexporter # -U pgexporter [options] [command]
$ pgexporter-cli -P pgexporter # -U pgexporter [options] [command]
NOTE
If you do not provide your credentials in the arguments, you will be prompted to provide them later.
NOTE
Steps for registering a username and password to access pgexporter
through pgexporter-cli
can be viewed here.
Log File
Description:
Specify the log file for pgexporter_config
.
$ pgexporter-cli -L <path-to-log-file> # -U <username> [options] [command]
# or
$ pgexporter-cli --logfile <path-to-log-file> # -U <username> [options] [command]
$ pgexporter-cli -L <path-to-log-file> # -U <username> [options] [command]
# or
$ pgexporter-cli --logfile <path-to-log-file> # -U <username> [options] [command]
# Assuming wanting a logfile ./log.out
$ pgexporter-cli -L ./log.out # -U <username> [options] [command]
# Assuming wanting a logfile ./log.out
$ pgexporter-cli -L ./log.out # -U <username> [options] [command]
Verbose
Description:
Outputs more verbose information.
$ pgexporter-cli -v # [options] [command]
# or
$ pgexporter-cli --verbose # [options] [command]
$ pgexporter-cli -v # [options] [command]
# or
$ pgexporter-cli --verbose # [options] [command]