Skip to content
Switch branches/tags


Failed to load latest commit information.
Latest commit message
Commit time

pgSCV - PostgreSQL ecosystem metrics collector.



  • Supported services: PostgreSQL, Pgbouncer, Patroni, metrics of operating system.
  • Pull mode. pgSCV can listen on /metrics endpoint and serving requests from Prometheus or Victoriametrics' Vmagent.
  • Push mode. pgSCV can scrape its own /metrics endpoint and push scraped metrics to specified HTTP service. This feature primarily used for sending metrics to Weaponry SaaS, but not limited by this purpose.
  • TLS and authentication. /metrics endpoint could be protected with basic authentication and TLS.
  • Collecting metrics from multiple services. pgSCV can collect metrics from many databases instances.
  • Services auto-discovery. pgSCV can automatically discover Postgres and other Postgres-ecosystem services and start collecting metrics from them. In case of authentication, valid requisites should be specified.
  • Remote services support. pgSCV is recommended to start on the same systems where monitored services are running. But this is not strict and pgSCV could connect and collect metrics from remote services.
  • Bootstrap. pgSCV can bootstrap itself - it is one-time procedure, during bootstrap pgSCV installs itself into system path, creates minimal required configuration, installs systemd unit and starts itself. Requires root privileges.
  • Auto-update. pgSCV can track new releases and update itself. This feature is mostly useful for Weaponry users. Requires root privileges.
  • User-defined metrics. pgSCV could be configured in a way to collect metrics defined by user.
  • Collectors management. Collectors could be disabled if necessary.
  • Collectors filters. Collectors could be adjusted to skip collecting metrics based on labels values, like block devices, network interfaces, filesystems, users, databases, etc.


  • can run on Linux only; can connect to remote services running on other OS/PaaS.
  • requisites for connecting to the services, such as login and password.
  • database user should have privileges for executing stats functions and reading views. For more details see security considerations.

Quick start

Download the archive from releases. Unpack the archive. Start pgSCV under postgres user.

tar xvzf pgscv_0.6.0_linux_amd64.tar.gz
sudo -u postgres ./pgscv 

or using Docker, use DATABASE_DSN for setting up a connection to Postgres:

docker pull weaponry/pgscv:latest
docker run -ti -e PGSCV_LISTEN_ADDRESS= -e PGSCV_DISABLE_COLLECTORS="system" -e DATABASE_DSN="postgresql://postgres@dbhost/postgres" -p 9890:9890 weaponry/pgscv:latest

When pgSCV has been started it is ready to accept HTTP requests at

Complete setup

pgSCV complete setup is possible in two ways:

  1. For non-Weaponry users. Setup as a standalone service, which accepts metrics scrape requests only. Checkout complete setup guide.
  2. For Weaponry users. Setup as an agent of Weaponry SaaS, which receives metrics to Weaponry service. Checkout complete setup guide. Listening for scrape requests also work.


For further documentation see wiki.

Support and feedback

If you need help using pgSCV feel free to open discussion or create an issue

Development and contribution

To help development you are encouraged to:



BSD-3. See LICENSE for more details.


pgSCV is a multi-purpose monitoring agent and metrics exporter for Weaponry.IO





No packages published