Categorygithub.com/kaldaray/pg_probackup_exporter
repositorypackage
0.0.2
Repository: https://github.com/kaldaray/pg_probackup_exporter.git
Documentation: pkg.go.dev

# README

PostgreSQL probackup exporter

Prometheus exporter for various metrics about pg_probackup, written in Go. Listen 9231 port/tcp.

Metrics

MetricTableDescription
pg_probackup_integrity_checkGaugepg_probackup_integrity_check Integrity check status 1 - OK, 0 - FAIL
pg_probackup_size_bytesGaugeSize of backup in bytes
pg_probackup_statusGaugeStatus of current backup 1 - OK, 0 - FAIL.
pg_probackup_wal_bytesGaugeWAL size in bytes

Usage

Build app

go build -o pg_probackup_exporter main.go

Copy service and app from repo to yor host and start service.

In service you should write your path to backup pg_probackup directory and path to pg_probackup util:

Example isntallation.

sudo cp pg_probackup_exporter.service /etc/systemd/system/pg_probackup_exporter.service
sudo cp pg_probackup_exporter /usr/bin/pg_probackup_exporter /usr/bin/pg_probackup_exporter
sudo chown postgres:postgres /usr/bin/pg_probackup_exporter
sudo chmod +x 
sudo systemctl daemon-reload
sudo systemctl enalbe pg_probackup_exporter.service
sudo systemctl start pg_probackup_exporter.service

On Prometheus server:

  - job_name: 'pg_probackup_metrics'
    scrape_interval: 60s
    scrape_timeout: 5s
    static_configs:
    - targets:
      - your_host:9231