pg_pinger

command module
v0.0.0-...-73dc979 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2021 License: GPL-3.0 Imports: 8 Imported by: 0

README

Go Report Card

installation

via docker:

make docker

or:

mkdir -p ~/go/src
git clone https://github.com/evkuzin/pg_pinger.git
make
  • clone repository to ~/go/src
  • install golang on the host (use make requirements if you are on linux)
  • run make inside cloned repo to build bin file

usage

via docker:

docker run -i -v $(pwd)/config.yaml:/app/config.yaml pg_pinger -conf /app/config.yaml

to track failover/switchover run in pinger mode. It will track all nodes and measure mode (master/replica) and downtime

# pg_pinger -h
Usage of pg_pinger:
  -conf string
        config file location (default "config.yaml")
  -cpuprofile string
        write cpu profile to file
  -log string
        logging level (default "info")
  -mod string
        choose between load generator or pinger (default "pinger")
  -thread int
        threads per server (generator mod only, default 20)

to add some basic load run in generator mode. It will run inserts for master and selects for replicas. New master tracking time is 300ms. Useful to simulate split-brain situation.

For generator mode require table on a postgres side:

CREATE TABLE test_table (field1 text, field2 text,field3 text);

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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