This repository has been archived by the owner on Aug 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 28
Getting started
Alexey Lesovsky edited this page Jun 11, 2021
·
5 revisions
TLDR: download and run pgSCV, scrape metrics with cURL.
-
Go to releases page and select latest release, for example v0.6.0. Copy url of
.tar.gz
archive from assets section. -
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
- Unpack the archive.
tar xvzf pgscv_0.6.0_linux_amd64.tar.gz
- 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.
- 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.
- Open the second terminal and check metrics
curl -s 127.0.0.1:9890/metrics
You should see metrics in Prometheus format.