Skip to main content

A CLI tool to manage Patroni cluster, elect new leaders, and perform switchover.

Project description

Patroni CLI

Patroni CLI is a command-line tool that allows you to manage a Patroni PostgreSQL cluster. You can use it to view cluster status, elect new leaders, and perform switchovers between nodes.

Features

  • View Cluster Status: List all cluster members and their roles.
  • Elect New Leader: Trigger a failover and elect a new leader for the cluster.
  • Switchover: Perform a switchover to a specified node or any healthy node.

Installation

You can install the Patroni CLI via pip after packaging:

pip install patroni-cli

Usage

Here are the available commands:

Check Cluster Status

patroni-cli --url http://localhost:8008 --username admin --password admin status

Elect a New Leader

patroni-cli --url http://localhost:8008 --username admin --password admin elect new_leader_name

Perform a Switchover

patroni-cli --url http://localhost:8008 --username admin --password admin switchover target_leader_name

If you want to perform a switchover without specifying a target leader, use:

patroni-cli --url http://localhost:8008 --username admin --password admin switchover

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

patroni_cli-0.1.2.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

patroni_cli-0.1.2-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file patroni_cli-0.1.2.tar.gz.

File metadata

  • Download URL: patroni_cli-0.1.2.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for patroni_cli-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1ff20e96b61143bffa33d8f9af847a8ced1b966d696044df92ffc78d1eff6915
MD5 1d36dc11394bc4260d24fa27f6c0ca6c
BLAKE2b-256 3b8a916dc47357c5ad4537e092d0cd9c92acb69e1778c66c26230bdb8433092c

See more details on using hashes here.

File details

Details for the file patroni_cli-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: patroni_cli-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.4

File hashes

Hashes for patroni_cli-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 651175ba97c75e47eb011ac3bb7b35c20b15eb981a1157f270e4216bef5042e5
MD5 6c7af9d4b8b8a02f442e71f719d4a266
BLAKE2b-256 3cf24265e7091694f94d735b3f2bcf2e70e4296a80ae113cea999cdfe1ea54ce

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page