pgexporter
Command Line Flags
Usage:
pgexporter [options] -c <config-file> -u <users-file>
pgexporter -?
pgexporter -V
pgexporter [options] -c <config-file> -u <users-file>
pgexporter -?
pgexporter -V
Compulsory Flags:
-c
or--config
<config-file>
: Specify thepgexporter.conf
file path.-u
or--users
<users-file>
: Specify thepgexporter_users.conf
file path.
Options:
-A
or--admins
<admins-file>
: Set the path for Admins' file.-Y
or--yaml
<yaml-file>
or-Y
or--yaml
<yaml-dir>
: Set the path to the custom YAML metrics file or set the path for the directory containing multiple custom YAML metrics files.-d
or--daemon
: Runpgexporter
as a daemon.-C
or--collectors
name,[name...]
: Enable only specific collectors.-?
or--help
: Display help text.-v
or--version
: Display version information.
NOTE
The notation standard used for describing usage can be found here.
Information Flags
Help
Usage:
sh
$ pgexporter -?
# or
$ pgexporter --help
$ pgexporter -?
# or
$ pgexporter --help
Output:
pgexporter 0.5.0
Prometheus exporter for PostgreSQL
USAGE:
pgexporter [options] -c <config-file> -u <users-file>
pgexporter -?
pgexporter -V
COMPULSORY FLAGS:
-c, --config <config-file> Set the path to the pgexporter.conf file
-u, --users <users-file> Set the path to the pgexporter_users.conf file
META OPTIONS:
-?, --help Display help
-V, --version Display version information
OPTIONS:
-A, --admins <admins-file> Set the path to the pgexporter_admins.conf file
-Y, --yaml <yaml-file> Set the path to YAML file
<yaml-dir> Set the path to YAML directory
-d, --daemon Run as a daemon
-C, --collectors name,[name...] Enable only specific collectors
pgexporter: https://pgexporter.github.io/
Report bugs: https://github.com/pgexporter/pgexporter/issues
pgexporter 0.5.0
Prometheus exporter for PostgreSQL
USAGE:
pgexporter [options] -c <config-file> -u <users-file>
pgexporter -?
pgexporter -V
COMPULSORY FLAGS:
-c, --config <config-file> Set the path to the pgexporter.conf file
-u, --users <users-file> Set the path to the pgexporter_users.conf file
META OPTIONS:
-?, --help Display help
-V, --version Display version information
OPTIONS:
-A, --admins <admins-file> Set the path to the pgexporter_admins.conf file
-Y, --yaml <yaml-file> Set the path to YAML file
<yaml-dir> Set the path to YAML directory
-d, --daemon Run as a daemon
-C, --collectors name,[name...] Enable only specific collectors
pgexporter: https://pgexporter.github.io/
Report bugs: https://github.com/pgexporter/pgexporter/issues
Version
Usage:
sh
$ pgexporter --version
# or
$ pgexporter -V
$ pgexporter --version
# or
$ pgexporter -V
Output:
pgexporter 0.4.1
pgexporter 0.4.1
Compulsory Flags
Config File
Usage:
sh
$ pgexporter -c /path/to/pgexporter.conf #-u <users-file> [options]
$ pgexporter -c /path/to/pgexporter.conf #-u <users-file> [options]
Users File
Usage:
sh
$ pgexporter -u /path/to/pgexporter_users.conf #-c <config-file> [options]
$ pgexporter -u /path/to/pgexporter_users.conf #-c <config-file> [options]
Options
Admin's File
sh
$ pgexporter --admins <admins-file> # -c <config-file> -u <users-file> [options]
# or
$ pgexporter -A <admins-file> # -c <config-file> [options] -u <users-file>
$ pgexporter --admins <admins-file> # -c <config-file> -u <users-file> [options]
# or
$ pgexporter -A <admins-file> # -c <config-file> [options] -u <users-file>
Custom Metrics' YAML
YAML File
If custom metrics are defined in a single YAML
file with path /path/to/yaml/file
:
sh
$ pgexporter -Y /path/to/yaml/file # -c <config-file> -u <users-file> [options]
# or
$ pgexporter --yaml /path/to/yaml/file # -c <config-file> -u <users-file> [options]
$ pgexporter -Y /path/to/yaml/file # -c <config-file> -u <users-file> [options]
# or
$ pgexporter --yaml /path/to/yaml/file # -c <config-file> -u <users-file> [options]
YAML Directory
If custom metrics are defined in multiple YAML
files inside a single directory with path /path/to/yaml/dir
:
sh
$ pgexporter -Y /path/to/yaml/dir # -c <config-file> -u <users-file> [options]
# or
$ pgexporter --yaml /path/to/yaml/dir # -c <config-file> -u <users-file> [options]
$ pgexporter -Y /path/to/yaml/dir # -c <config-file> -u <users-file> [options]
# or
$ pgexporter --yaml /path/to/yaml/dir # -c <config-file> -u <users-file> [options]
Run As A Daemon
If pgexporter
needs to be run as a background process (daemon):
sh
$ pgexporter -d # -c <config-file> -u <users-file> [options]
$ pgexporter -d # -c <config-file> -u <users-file> [options]
Enable Only Specific Collectors
If you need only specific collectors (from within both internal and custom metrics):
sh
$ pgexporter -C name,[name...] # -c <config-file> -u <users-file> [options]
$ pgexporter -C name,[name...] # -c <config-file> -u <users-file> [options]
where the argument is` is a comma-separated list of one or more collector names.
This will disabled all other configured collectors except general metrics.