PGEXPORTER.CONF(5)

πŸ“¦ version 0.7.0, in alpine 3.24

πŸ’– NAME πŸ’–

pgexporter.conf is the main configuration file for pgexporter β€” yes bestie, the main-character config file itself. ✨

🌸 DESCRIPTION 🌸

pgexporter.conf is the main configuration file for pgexporter. Iconic behavior only. πŸ’…

The file is split into different sections specified by the [ and ] characters. The main section is called [pgexporter].

Other sections specify the PostgreSQL server configuration.

All properties are in the format key = value.

The characters # and ; can be used for comments; they must be the first character on the line. The Bool data type supports the following values: on, 1, true, off, 0 and false. No cap, that’s the whole bool menu. πŸŽ€

✨ OPTIONS ✨

πŸ’– The options for the main section are

  • host β€” The bind address for pgexporter. Mandatory β€” like, actually required, bestie.
  • unix_socket_dir β€” The Unix Domain Socket location. Mandatory.
  • metrics β€” The metrics port. Mandatory.
  • metrics_path β€” Path to customized metrics (either a YAML file or a directory with YAML files).
  • metrics_cache_max_age β€” The number of seconds to keep in cache a Prometheus (metrics) response. If set to zero, the caching will be disabled. Can be a string with a suffix, like 2m to indicate 2 minutes. Default is 0 (disabled).
  • metrics_cache_max_size β€” The maximum amount of data to keep in cache when serving Prometheus responses. Changes require restart. This parameter determines the size of memory allocated for the cache even if metrics_cache_max_age or metrics are disabled. Its value, however, is taken into account only if metrics_cache_max_age is set to a non-zero value. Supports suffixes: B (bytes), the default if omitted, K or KB (kilobytes), M or MB (megabytes), G or GB (gigabytes). Default is 256k.
  • bridge β€” The bridge port.
  • bridge_endpoints β€” A comma-separated list of bridge endpoints specified by host:port.
  • bridge_cache_max_age β€” The number of seconds to keep in cache a Prometheus (bridge) response. If set to zero, the caching will be disabled. Can be a string with a suffix, like 2m to indicate 2 minutes. Default is 5m.
  • bridge_cache_max_size β€” The maximum amount of data to keep in cache when serving Prometheus responses. Changes require restart. If set to zero, the caching will be disabled. Supports suffixes: B (bytes), the default if omitted, K or KB (kilobytes), M or MB (megabytes), G or GB (gigabytes). Default is 10M.
  • bridge_json β€” The bridge JSON port.
  • bridge_json_cache_max_size β€” The maximum amount of data to keep in cache when serving Prometheus JSON responses. Changes require restart. If set to zero, the caching will be disabled. Supports suffixes: B (bytes), the default if omitted, K or KB (kilobytes), M or MB (megabytes), G or GB (gigabytes). Default is 10M.
  • management β€” The remote management port. Default is 0 (disabled).
  • cache β€” Cache connection. Default is on.
  • log_type β€” The logging type (console, file, syslog). Default is console.
  • log_level β€” The logging level, any of the (case insensitive) strings FATAL, ERROR, WARN, INFO and DEBUG (that can be more specific as DEBUG1 thru DEBUG5). Debug level greater than 5 will be set to DEBUG5. Not recognized values will make the log_level be INFO. Default is info.
  • log_path β€” The log file location. Default is pgexporter.log. Can be a strftime(3) compatible string.
  • log_rotation_age β€” The age that will trigger a log file rotation. If expressed as a positive number, is managed as seconds. Supports suffixes: S (seconds, the default), M (minutes), H (hours), D (days), W (weeks). A value of 0 disables. Default is 0 (disabled).
  • log_rotation_size β€” The size of the log file that will trigger a log rotation. Supports suffixes: B (bytes), the default if omitted, K or KB (kilobytes), M or MB (megabytes), G or GB (gigabytes). A value of 0 (with or without suffix) disables. Default is 0.
  • log_line_prefix β€” A strftime(3) compatible string to use as prefix for every log line. Must be quoted if contains spaces. Default is %Y-%m-%d %H:%M:%S.
  • log_mode β€” Append to or create the log file (append, create). Default is append.
  • blocking_timeout β€” The number of seconds the process will be blocking for a connection (disable = 0). Default is 30.
  • tls β€” Enable Transport Layer Security (TLS). Default is false.
  • tls_cert_file β€” Certificate file for TLS.
  • tls_key_file β€” Private key file for TLS.
  • tls_ca_file β€” Certificate Authority (CA) file for TLS.
  • metrics_cert_file β€” Certificate file for TLS for Prometheus metrics.
  • metrics_key_file β€” Private key file for TLS for Prometheus metrics.
  • metrics_ca_file β€” Certificate Authority (CA) file for TLS for Prometheus metrics.
  • libev β€” The libev backend to use. Valid options: auto, select, poll, epoll, iouring, devpoll and port. Default is auto.
  • keep_alive β€” Have SO_KEEPALIVE on sockets. Default is on.
  • nodelay β€” Have TCP_NODELAY on sockets. Default is on.
  • non_blocking β€” Have O_NONBLOCK on sockets. Default is on.
  • backlog β€” The backlog for listen(). Minimum 16. Default is 16.
  • hugepage β€” Huge page support. Default is try.
  • pidfile β€” Path to the PID file.
  • update_process_title β€” The behavior for updating the operating system process title. Allowed settings are: never (or off), does not update the process title; strict to set the process title without overriding the existing initial process title length; minimal to set the process title to the base description; verbose (or full) to set the process title to the full description. Please note that strict and minimal are honored only on those systems that do not provide a native way to set the process title (e.g., Linux). On other systems, there is no difference between strict and minimal and the assumed behaviour is minimal even if strict is used. never and verbose are always honored, on every system. On Linux systems the process title is always trimmed to 255 characters, while on systems that provide a native way to set the process title it can be longer. Default is verbose.

πŸ¦‹ The options for the PostgreSQL section are

  • host β€” The address of the PostgreSQL instance. Mandatory.
  • port β€” The port of the PostgreSQL instance. Mandatory.
  • user β€” The user name for the replication role. Mandatory.
  • data_dir β€” The location of the data directory.
  • wal_dir β€” The location of the WAL directory.

🐞 REPORTING BUGS 🐞

pgexporter is maintained on GitHub at https://github.com/pgexporter/pgexporter β€” that’s the spot, bestie. 🫢

pgexporter is licensed under the 3-clause BSD License. Legal slay, periodt. πŸ’œ

🌈 SEE ALSO 🌈

pgexporter(1), pgexporter-cli(1), pgexporter-admin(1)

okay bye bestie πŸ’– β€” you just read pgexporter.conf’s section 5 in the File Formats Manual, and that’s the whole footer moment: section tag only, no extra date/version line hiding down here. stay configured. πŸŽ€

πŸ“¦ where this page comes from