Skip to content
This repository has been archived by the owner on Aug 22, 2024. It is now read-only.

Getting started

Alexey Lesovsky edited this page Jun 11, 2021 · 5 revisions

Getting started with pgSCV.

TLDR: download and run pgSCV, scrape metrics with cURL.

  1. Go to releases page and select latest release, for example v0.6.0. Copy url of .tar.gz archive from assets section.

  2. Go to the server and download archive using cURL utility.

curl -O -L https://github.com/weaponry/pgscv/releases/download/v0.6.0/pgscv_0.6.0_linux_amd64.tar.gz
  1. Unpack the archive.
tar xvzf pgscv_0.6.0_linux_amd64.tar.gz
  1. Create config file where you need to specify default credentials for connecting to Postgres.
cat << EOF > pgscv.yaml
defaults:
    postgres_username: "postgres"
    postgres_password: "supersecretpassword"
EOF

Instead of postgres user you could use other user.

  1. Run pgscv.
./pgscv --config-file pgscv.yaml

You should see no error. After startup pgSCV discovers running services on the host and tries connecting to PostgreSQL service using provided credentials.

  1. Open the second terminal and check metrics
curl -s 127.0.0.1:9890/metrics

You should see metrics in Prometheus format.