Prometheus Exporter for PostgreSQL

2 hours ago 1

pgexporter is a Prometheus exporter for PostgreSQL.

pgexporter will connect to one or more PostgreSQL instances and let you monitor their operation.

See Metrics for a list of currently available metrics.

  • Prometheus exporter
  • Bridge support with a JSON feature
  • Remote management
  • Transport Layer Security (TLS) v1.2+ support
  • Daemon mode
  • User vault

See Getting Started on how to get started with pgexporter.

See Configuration on how to configure pgexporter.

See YAML on how to configure pgexporter with custom queries.

pgexporter makes use of

  • Process model
  • Shared memory model across processes
  • libev for fast network interactions
  • Atomic operations are used to keep track of state
  • The PostgreSQL native protocol v3 for its communication

See Architecture for the architecture of pgexporter.

pgexporter requires

dnf install git gcc cmake make libev libev-devel openssl openssl-devel systemd systemd-devel python3-docutils libyaml libyaml-devel zlib zlib-devel libzstd libzstd-devel lz4 lz4-devel bzip2 bzip2-devel libasan libasan-static

Alternative clang 8+ can be used.

The following commands will install pgexporter in the /usr/local hierarchy.

git clone https://github.com/pgexporter/pgexporter.git cd pgexporter mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/usr/local .. make sudo make install

See RPM for how to build a RPM of pgexporter.

The following commands will create a DEBUG version of pgexporter.

git clone https://github.com/pgexporter/pgexporter.git cd pgexporter mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Debug .. make

Remember to set the log_level configuration option to debug5.

Contributions to pgexporter are managed on GitHub.com

Contributions are most welcome !

Please, consult our Code of Conduct policies for interacting in our community.

Consider giving the project a star on GitHub if you find it useful.

BSD-3-Clause

Read Entire Article