pgscv

module
v0.4.23 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 16, 2021 License: BSD-3-Clause

README

pgSCV - PostgreSQL ecosystem metrics collector.

pgSCV
Features
  • 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.
  • 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. Some collectors could be adjusted to skip collecting metrics about unnecessary stuff, like block devices, network interfaces, filesystems, etc.
Requirements
  • 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.

wget https://github.com/weaponry/pgscv/releases/download/v0.4.22/pgscv_0.4.22_linux_amd64.tar.gz
tar xvzf pgscv_0.4.22_linux_amd64.tar.gz
sudo -u postgres ./pgscv 

When pgSCV has been started it is ready to accept HTTP requests at http://127.0.0.1:9890/metrics.

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.
Documentation

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:

License

BSD-3. See LICENSE for more details.

Directories

Path Synopsis
internal
log

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL