---
name: "check_patroni"
section: "1"
platform: "linux"
package: "check-patroni"
version: "2.2.0-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/check_patroni"
---

# check\_patroni(1)

Nagios plugin to check on patroni

## NAME

check-patroni - Nagios plugin to check on patroni

## SYNOPSIS

**check\_patroni** \[*OPTIONS*\] *COMMAND* \[*ARGS*\]...

## DESCRIPTION

-

  Nagios plugin that uses Patroni's REST API to monitor a Patroni cluster.

## OPTIONS

- **--config** FILE

  Read option defaults from the specified INI file \[default: config.ini\]

- **-e**, **--endpoints** TEXT

  Patroni API endpoint. Can be specified multiple times or as a list of comma separated addresses. The node services checks the status of one node, therefore if several addresses are specified they should point to different interfaces on the same node. The cluster services check the status of the cluster, therefore it's better to give a list of all Patroni node addresses.  \[default: http://127.0.0.1:8008\]

- **--cert\_file** PATH

  File with the client certificate.

- **--key\_file** PATH

  File with the client key.

- **--ca\_file** PATH

  The CA certificate.

- **-v**, **--verbose**

  Increase verbosity **-v** (info)/-vv (warning)/-vvv (debug)

**--version**

- **--timeout** INTEGER

  Timeout in seconds for the API queries (0 to disable) \[default: 2\]

- **--help**

  Show this message and exit.

### Commands:

- cluster\_config\_has\_changed

  Check if the hash of the configuration...

- cluster\_has\_leader

  Check if the cluster has a leader.

- cluster\_has\_replica

  Check if the cluster has healthy replicas...

- cluster\_has\_scheduled\_action

  Check if the cluster has a scheduled...

- cluster\_is\_in\_maintenance

  Check if the cluster is in maintenance...

- cluster\_node\_count

  Count the number of nodes in the cluster.

- node\_is\_alive

  Check if the node is alive ie patroni is...

- node\_is\_leader

  Check if the node is a leader node.

- node\_is\_pending\_restart

  Check if the node is in pending restart...

- node\_is\_primary

  Check if the node is the primary with the...

- node\_is\_replica

  Check if the node is a replica with no...

- node\_patroni\_version

  Check if the version is equal to the input

- node\_tl\_has\_changed

  Check if the timeline has changed.
