check-patroni


Namecheck-patroni JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/dalibo/check_patroni
SummaryNagios plugin to check on patroni
upload_time2023-08-28 10:12:59
maintainer
docs_urlNone
authorDalibo
requires_python>=3.6
licensePostgreSQL
keywords patroni nagios check
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # check_patroni

A nagios plugin for patroni.

## Features

- Check presence of leader, replicas, node counts.
- Check each node for replication status.


```
Usage: check_patroni [OPTIONS] COMMAND [ARGS]...

  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 running replica...
  node_patroni_version          Check if the version is equal to the input
  node_tl_has_changed           Check if the timeline has changed.
```

## Install

check_patroni is licensed under PostgreSQL license.

```
$ pip install git+https://github.com/dalibo/check_patroni.git
```

check_patroni works on python 3.6, we keep it that way because patroni also
supports it and there are still lots of RH 7 variants around. That being said
python 3.6 has been EOL for age and there is no support for it in the github
CI.

## Support

If you hit a bug or need help, open a [GitHub
issue](https://github.com/dalibo/check_patroni/issues/new). Dalibo has no
commitment on response time for public free support. Thanks for you
contribution !

## Config file

All global and service specific parameters can be specified via a config file has follows:

```
[options]
endpoints = https://10.20.199.3:8008, https://10.20.199.4:8008,https://10.20.199.5:8008
cert_file = ./ssl/my-cert.pem
key_file = ./ssl/my-key.pem
ca_file = ./ssl/CA-cert.pem
timeout = 0

[options.node_is_replica]
lag=100
```
## Thresholds

The format for the threshold parameters is `[@][start:][end]`.

* `start:` may be omitted if `start == 0`
* `~:` means that start is negative infinity
* If `end` is omitted, infinity is assumed
* To invert the match condition, prefix the range expression with `@`.

A match is found when: `start <= VALUE <= end`.

For example, the following command will raise:

* a warning if there is less than 1 nodes, wich can be translated to outside of range [2;+INF[
* a critical if there are no nodes, wich can be translated to outside of range [1;+INF[

```
check_patroni -e https://10.20.199.3:8008 cluster_has_replica --warning 2: --critical 1:
```

## SSL

Several options are available:

* the server's CA certificate is not available or trusted by the client system:
  * `--ca_cert`: your certification chain `cat CA-certificate server-certificate > cabundle`
* you have a client certificate for authenticating with Patroni's REST API:
  * `--cert_file`: your certificate or the concatenation of your certificate and private key
  * `--key_file`: your private key (optional)


## Cluster services

### cluster_config_has_changed

```
Usage: check_patroni cluster_config_has_changed [OPTIONS]

  Check if the hash of the configuration has changed.

  Note: either a hash or a state file must be provided for this service to
  work.

  Check:
  * `OK`: The hash didn't change
  * `CRITICAL`: The hash of the configuration has changed compared to the input (`--hash`) or last time (`--state_file`)

  Perfdata:
  * `is_configuration_changed` is 1 if the configuration has changed

Options:
  --hash TEXT            A hash to compare with.
  -s, --state-file TEXT  A state file to store the hash of the configuration.
  --save                 Set the current configuration hash as the reference
                         for future calls.
  --help                 Show this message and exit.
```

### cluster_has_leader

```
Usage: check_patroni cluster_has_leader [OPTIONS]

  Check if the cluster has a leader.

  This check applies to any kind of leaders including standby leaders.

  Check:
  * `OK`: if there is a leader node.
  * `CRITICAL`: otherwise

  Perfdata: `has_leader` is 1 if there is a leader node, 0 otherwise

Options:
  --help  Show this message and exit.
```

### cluster_has_replica

```
Usage: check_patroni cluster_has_replica [OPTIONS]

  Check if the cluster has healthy replicas and/or if some are sync standbies

  A healthy replica:
  * is in running or streaming state (V3.0.4)
  * has a replica or sync_standby role
  * has a lag lower or equal to max_lag

  Check:
  * `OK`: if the healthy_replica count and their lag are compatible with the replica count threshold.
          and if the sync_replica count is compatible with the sync replica count threshold.
  * `WARNING` / `CRITICAL`: otherwise

  Perfdata:
  * healthy_replica & unhealthy_replica count
  * the number of sync_replica, they are included in the previous count
  * the lag of each replica labelled with  "member name"_lag
  * a boolean to tell if the node is a sync stanbdy labelled with  "member name"_sync

Options:
  -w, --warning TEXT    Warning threshold for the number of healthy replica
                        nodes.
  -c, --critical TEXT   Critical threshold for the number of healthy replica
                        nodes.
  --sync-warning TEXT   Warning threshold for the number of sync replica.
  --sync-critical TEXT  Critical threshold for the number of sync replica.
  --max-lag TEXT        maximum allowed lag
  --help                Show this message and exit.
```

### cluster_has_scheduled_action

```
Usage: check_patroni cluster_has_scheduled_action [OPTIONS]

  Check if the cluster has a scheduled action (switchover or restart)

  Check:
  * `OK`: If the cluster has no scheduled action
  * `CRITICAL`: otherwise.

  Perfdata:
  * `scheduled_actions` is 1 if the cluster has scheduled actions.
  * `scheduled_switchover` is 1 if the cluster has a scheduled switchover.
  * `scheduled_restart` counts the number of scheduled restart in the cluster.

Options:
  --help  Show this message and exit.
```

### cluster_is_in_maintenance

```
Usage: check_patroni cluster_is_in_maintenance [OPTIONS]

  Check if the cluster is in maintenance mode or paused.

  Check:
  * `OK`: If the cluster is in maintenance mode.
  * `CRITICAL`: otherwise.

  Perfdata:
  * `is_in_maintenance` is 1 the cluster is in maintenance mode,  0 otherwise

Options:
  --help  Show this message and exit.
```

### cluster_node_count

```
Usage: check_patroni cluster_node_count [OPTIONS]

  Count the number of nodes in the cluster.

  The state refers to the state of PostgreSQL. Possible values are:
  * initializing new cluster, initdb failed
  * running custom bootstrap script, custom bootstrap failed
  * starting, start failed
  * restarting, restart failed
  * running, streaming (for a replica V3.0.4)
  * stopping, stopped, stop failed
  * creating replica
  * crashed

  The role refers to the role of the server in the cluster. Possible values
  are:
  * master or leader (V3.0.0+)
  * replica
  * demoted
  * promoted
  * uninitialized

  Check:
  * Compares the number of nodes against the normal and healthy (running + streaming) nodes warning and critical thresholds.
  * `OK`:  If they are not provided.

  Perfdata:
  * `members`: the member count.
  * `healthy_members`: the running and streaming member count.
  * all the roles of the nodes in the cluster with their count (start with "role_").
  * all the statuses of the nodes in the cluster with their count (start with "state_").

Options:
  -w, --warning TEXT       Warning threshold for the number of nodes.
  -c, --critical TEXT      Critical threshold for the number of nodes.
  --healthy-warning TEXT   Warning threshold for the number of healthy nodes
                           (running + streaming).
  --healthy-critical TEXT  Critical threshold for the number of healthy nodes
                           (running + streaming).
  --help                   Show this message and exit.
```

## Node services

### node_is_alive

```
Usage: check_patroni node_is_alive [OPTIONS]

  Check if the node is alive ie patroni is running. This is a liveness check
  as defined in Patroni's documentation.

  Check:
  * `OK`: If patroni is running.
  * `CRITICAL`: otherwise.

  Perfdata:
  * `is_running` is 1 if patroni is running, 0 otherwise

Options:
  --help  Show this message and exit.
```

### node_is_pending_restart

```
Usage: check_patroni node_is_pending_restart [OPTIONS]

  Check if the node is in pending restart state.

  This situation can arise if the configuration has been modified but requiers
  a restart of PostgreSQL to take effect.

  Check:
  * `OK`: if the node has no pending restart tag.
  * `CRITICAL`: otherwise

  Perfdata: `is_pending_restart` is 1 if the node has pending restart tag, 0
  otherwise.

Options:
  --help  Show this message and exit.
```

### node_is_leader

```
Usage: check_patroni node_is_leader [OPTIONS]

  Check if the node is a leader node.

  This check applies to any kind of leaders including standby leaders. To
  check explicitly for a standby leader use the `--is-standby-leader` option.

  Check:
  * `OK`: if the node is a leader.
  * `CRITICAL:` otherwise

  Perfdata: `is_leader` is 1 if the node is a leader node, 0 otherwise.

Options:
  --is-standby-leader  Check for a standby leader
  --help               Show this message and exit.
```

### node_is_primary

```
Usage: check_patroni node_is_primary [OPTIONS]

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

  This service is not valid for a standby leader, because this kind of node is
  not a primary.

  Check:
  * `OK`: if the node is a primary with the leader lock.
  * `CRITICAL:` otherwise

  Perfdata: `is_primary` is 1 if the node is a primary with the leader lock, 0
  otherwise.

Options:
  --help  Show this message and exit.
```

### node_is_replica

```
Usage: check_patroni node_is_replica [OPTIONS]

  Check if the node is a running replica with no noloadbalance tag.

  It is possible to check if the node is synchronous or asynchronous. If
  nothing is specified any kind of replica is accepted. When checking for a
  synchronous replica, it's not possible to specify a lag.

  Check:
  * `OK`: if the node is a running replica with noloadbalance tag and the lag is under the maximum threshold.
  * `CRITICAL`:  otherwise

  Perfdata: `is_replica` is 1 if the node is a running replica with
  noloadbalance tag and the lag is under the maximum threshold, 0 otherwise.

Options:
  --max-lag TEXT  maximum allowed lag
  --is-sync       check if the replica is synchronous
  --is-async      check if the replica is asynchronous
  --help          Show this message and exit.
```

### node_patroni_version

```
Usage: check_patroni node_patroni_version [OPTIONS]

  Check if the version is equal to the input

  Check:
  * `OK`: The version is the same as the input `--patroni-version`
  * `CRITICAL`: otherwise.

  Perfdata:
  * `is_version_ok` is 1 if version is ok, 0 otherwise

Options:
  --patroni-version TEXT  Patroni version to compare to  [required]
  --help                  Show this message and exit.
```

### node_tl_has_changed

```
Usage: check_patroni node_tl_has_changed [OPTIONS]

  Check if the timeline has changed.

  Note: either a timeline or a state file must be provided for this service to
  work.

  Check:
  * `OK`: The timeline is the same as last time (`--state_file`) or the inputted timeline (`--timeline`)
  * `CRITICAL`: The tl is not the same.

  Perfdata:
  * `is_timeline_changed` is 1 if the tl has changed, 0 otherwise
  * the timeline

Options:
  --timeline TEXT        A timeline number to compare with.
  -s, --state-file TEXT  A state file to store the last tl number into.
  --save                 Set the current timeline number as the reference for
                         future calls.
  --help                 Show this message and exit.
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/dalibo/check_patroni",
    "name": "check-patroni",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "patroni nagios check",
    "author": "Dalibo",
    "author_email": "contact@dalibo.com",
    "download_url": "https://files.pythonhosted.org/packages/d5/43/f990e0f78e1a4d4ed5948776673191e121cac8c731f1ad569b0514205008/check_patroni-1.0.0.tar.gz",
    "platform": null,
    "description": "# check_patroni\n\nA nagios plugin for patroni.\n\n## Features\n\n- Check presence of leader, replicas, node counts.\n- Check each node for replication status.\n\n\n```\nUsage: check_patroni [OPTIONS] COMMAND [ARGS]...\n\n  Nagios plugin that uses Patroni's REST API to monitor a Patroni cluster.\n\nOptions:\n  --config FILE         Read option defaults from the specified INI file\n                        [default: config.ini]\n  -e, --endpoints TEXT  Patroni API endpoint. Can be specified multiple times\n                        or as a list of comma separated addresses. The node\n                        services checks the status of one node, therefore if\n                        several addresses are specified they should point to\n                        different interfaces on the same node. The cluster\n                        services check the status of the cluster, therefore\n                        it's better to give a list of all Patroni node\n                        addresses.  [default: http://127.0.0.1:8008]\n  --cert_file PATH      File with the client certificate.\n  --key_file PATH       File with the client key.\n  --ca_file PATH        The CA certificate.\n  -v, --verbose         Increase verbosity -v (info)/-vv (warning)/-vvv\n                        (debug)\n  --version\n  --timeout INTEGER     Timeout in seconds for the API queries (0 to disable)\n                        [default: 2]\n  --help                Show this message and exit.\n\nCommands:\n  cluster_config_has_changed    Check if the hash of the configuration...\n  cluster_has_leader            Check if the cluster has a leader.\n  cluster_has_replica           Check if the cluster has healthy replicas...\n  cluster_has_scheduled_action  Check if the cluster has a scheduled...\n  cluster_is_in_maintenance     Check if the cluster is in maintenance...\n  cluster_node_count            Count the number of nodes in the cluster.\n  node_is_alive                 Check if the node is alive ie patroni is...\n  node_is_leader                Check if the node is a leader node.\n  node_is_pending_restart       Check if the node is in pending restart...\n  node_is_primary               Check if the node is the primary with the...\n  node_is_replica               Check if the node is a running replica...\n  node_patroni_version          Check if the version is equal to the input\n  node_tl_has_changed           Check if the timeline has changed.\n```\n\n## Install\n\ncheck_patroni is licensed under PostgreSQL license.\n\n```\n$ pip install git+https://github.com/dalibo/check_patroni.git\n```\n\ncheck_patroni works on python 3.6, we keep it that way because patroni also\nsupports it and there are still lots of RH 7 variants around. That being said\npython 3.6 has been EOL for age and there is no support for it in the github\nCI.\n\n## Support\n\nIf you hit a bug or need help, open a [GitHub\nissue](https://github.com/dalibo/check_patroni/issues/new). Dalibo has no\ncommitment on response time for public free support. Thanks for you\ncontribution !\n\n## Config file\n\nAll global and service specific parameters can be specified via a config file has follows:\n\n```\n[options]\nendpoints = https://10.20.199.3:8008, https://10.20.199.4:8008,https://10.20.199.5:8008\ncert_file = ./ssl/my-cert.pem\nkey_file = ./ssl/my-key.pem\nca_file = ./ssl/CA-cert.pem\ntimeout = 0\n\n[options.node_is_replica]\nlag=100\n```\n## Thresholds\n\nThe format for the threshold parameters is `[@][start:][end]`.\n\n* `start:` may be omitted if `start == 0`\n* `~:` means that start is negative infinity\n* If `end` is omitted, infinity is assumed\n* To invert the match condition, prefix the range expression with `@`.\n\nA match is found when: `start <= VALUE <= end`.\n\nFor example, the following command will raise:\n\n* a warning if there is less than 1 nodes, wich can be translated to outside of range [2;+INF[\n* a critical if there are no nodes, wich can be translated to outside of range [1;+INF[\n\n```\ncheck_patroni -e https://10.20.199.3:8008 cluster_has_replica --warning 2: --critical 1:\n```\n\n## SSL\n\nSeveral options are available:\n\n* the server's CA certificate is not available or trusted by the client system:\n  * `--ca_cert`: your certification chain `cat CA-certificate server-certificate > cabundle`\n* you have a client certificate for authenticating with Patroni's REST API:\n  * `--cert_file`: your certificate or the concatenation of your certificate and private key\n  * `--key_file`: your private key (optional)\n\n\n## Cluster services\n\n### cluster_config_has_changed\n\n```\nUsage: check_patroni cluster_config_has_changed [OPTIONS]\n\n  Check if the hash of the configuration has changed.\n\n  Note: either a hash or a state file must be provided for this service to\n  work.\n\n  Check:\n  * `OK`: The hash didn't change\n  * `CRITICAL`: The hash of the configuration has changed compared to the input (`--hash`) or last time (`--state_file`)\n\n  Perfdata:\n  * `is_configuration_changed` is 1 if the configuration has changed\n\nOptions:\n  --hash TEXT            A hash to compare with.\n  -s, --state-file TEXT  A state file to store the hash of the configuration.\n  --save                 Set the current configuration hash as the reference\n                         for future calls.\n  --help                 Show this message and exit.\n```\n\n### cluster_has_leader\n\n```\nUsage: check_patroni cluster_has_leader [OPTIONS]\n\n  Check if the cluster has a leader.\n\n  This check applies to any kind of leaders including standby leaders.\n\n  Check:\n  * `OK`: if there is a leader node.\n  * `CRITICAL`: otherwise\n\n  Perfdata: `has_leader` is 1 if there is a leader node, 0 otherwise\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### cluster_has_replica\n\n```\nUsage: check_patroni cluster_has_replica [OPTIONS]\n\n  Check if the cluster has healthy replicas and/or if some are sync standbies\n\n  A healthy replica:\n  * is in running or streaming state (V3.0.4)\n  * has a replica or sync_standby role\n  * has a lag lower or equal to max_lag\n\n  Check:\n  * `OK`: if the healthy_replica count and their lag are compatible with the replica count threshold.\n          and if the sync_replica count is compatible with the sync replica count threshold.\n  * `WARNING` / `CRITICAL`: otherwise\n\n  Perfdata:\n  * healthy_replica & unhealthy_replica count\n  * the number of sync_replica, they are included in the previous count\n  * the lag of each replica labelled with  \"member name\"_lag\n  * a boolean to tell if the node is a sync stanbdy labelled with  \"member name\"_sync\n\nOptions:\n  -w, --warning TEXT    Warning threshold for the number of healthy replica\n                        nodes.\n  -c, --critical TEXT   Critical threshold for the number of healthy replica\n                        nodes.\n  --sync-warning TEXT   Warning threshold for the number of sync replica.\n  --sync-critical TEXT  Critical threshold for the number of sync replica.\n  --max-lag TEXT        maximum allowed lag\n  --help                Show this message and exit.\n```\n\n### cluster_has_scheduled_action\n\n```\nUsage: check_patroni cluster_has_scheduled_action [OPTIONS]\n\n  Check if the cluster has a scheduled action (switchover or restart)\n\n  Check:\n  * `OK`: If the cluster has no scheduled action\n  * `CRITICAL`: otherwise.\n\n  Perfdata:\n  * `scheduled_actions` is 1 if the cluster has scheduled actions.\n  * `scheduled_switchover` is 1 if the cluster has a scheduled switchover.\n  * `scheduled_restart` counts the number of scheduled restart in the cluster.\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### cluster_is_in_maintenance\n\n```\nUsage: check_patroni cluster_is_in_maintenance [OPTIONS]\n\n  Check if the cluster is in maintenance mode or paused.\n\n  Check:\n  * `OK`: If the cluster is in maintenance mode.\n  * `CRITICAL`: otherwise.\n\n  Perfdata:\n  * `is_in_maintenance` is 1 the cluster is in maintenance mode,  0 otherwise\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### cluster_node_count\n\n```\nUsage: check_patroni cluster_node_count [OPTIONS]\n\n  Count the number of nodes in the cluster.\n\n  The state refers to the state of PostgreSQL. Possible values are:\n  * initializing new cluster, initdb failed\n  * running custom bootstrap script, custom bootstrap failed\n  * starting, start failed\n  * restarting, restart failed\n  * running, streaming (for a replica V3.0.4)\n  * stopping, stopped, stop failed\n  * creating replica\n  * crashed\n\n  The role refers to the role of the server in the cluster. Possible values\n  are:\n  * master or leader (V3.0.0+)\n  * replica\n  * demoted\n  * promoted\n  * uninitialized\n\n  Check:\n  * Compares the number of nodes against the normal and healthy (running + streaming) nodes warning and critical thresholds.\n  * `OK`:  If they are not provided.\n\n  Perfdata:\n  * `members`: the member count.\n  * `healthy_members`: the running and streaming member count.\n  * all the roles of the nodes in the cluster with their count (start with \"role_\").\n  * all the statuses of the nodes in the cluster with their count (start with \"state_\").\n\nOptions:\n  -w, --warning TEXT       Warning threshold for the number of nodes.\n  -c, --critical TEXT      Critical threshold for the number of nodes.\n  --healthy-warning TEXT   Warning threshold for the number of healthy nodes\n                           (running + streaming).\n  --healthy-critical TEXT  Critical threshold for the number of healthy nodes\n                           (running + streaming).\n  --help                   Show this message and exit.\n```\n\n## Node services\n\n### node_is_alive\n\n```\nUsage: check_patroni node_is_alive [OPTIONS]\n\n  Check if the node is alive ie patroni is running. This is a liveness check\n  as defined in Patroni's documentation.\n\n  Check:\n  * `OK`: If patroni is running.\n  * `CRITICAL`: otherwise.\n\n  Perfdata:\n  * `is_running` is 1 if patroni is running, 0 otherwise\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### node_is_pending_restart\n\n```\nUsage: check_patroni node_is_pending_restart [OPTIONS]\n\n  Check if the node is in pending restart state.\n\n  This situation can arise if the configuration has been modified but requiers\n  a restart of PostgreSQL to take effect.\n\n  Check:\n  * `OK`: if the node has no pending restart tag.\n  * `CRITICAL`: otherwise\n\n  Perfdata: `is_pending_restart` is 1 if the node has pending restart tag, 0\n  otherwise.\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### node_is_leader\n\n```\nUsage: check_patroni node_is_leader [OPTIONS]\n\n  Check if the node is a leader node.\n\n  This check applies to any kind of leaders including standby leaders. To\n  check explicitly for a standby leader use the `--is-standby-leader` option.\n\n  Check:\n  * `OK`: if the node is a leader.\n  * `CRITICAL:` otherwise\n\n  Perfdata: `is_leader` is 1 if the node is a leader node, 0 otherwise.\n\nOptions:\n  --is-standby-leader  Check for a standby leader\n  --help               Show this message and exit.\n```\n\n### node_is_primary\n\n```\nUsage: check_patroni node_is_primary [OPTIONS]\n\n  Check if the node is the primary with the leader lock.\n\n  This service is not valid for a standby leader, because this kind of node is\n  not a primary.\n\n  Check:\n  * `OK`: if the node is a primary with the leader lock.\n  * `CRITICAL:` otherwise\n\n  Perfdata: `is_primary` is 1 if the node is a primary with the leader lock, 0\n  otherwise.\n\nOptions:\n  --help  Show this message and exit.\n```\n\n### node_is_replica\n\n```\nUsage: check_patroni node_is_replica [OPTIONS]\n\n  Check if the node is a running replica with no noloadbalance tag.\n\n  It is possible to check if the node is synchronous or asynchronous. If\n  nothing is specified any kind of replica is accepted. When checking for a\n  synchronous replica, it's not possible to specify a lag.\n\n  Check:\n  * `OK`: if the node is a running replica with noloadbalance tag and the lag is under the maximum threshold.\n  * `CRITICAL`:  otherwise\n\n  Perfdata: `is_replica` is 1 if the node is a running replica with\n  noloadbalance tag and the lag is under the maximum threshold, 0 otherwise.\n\nOptions:\n  --max-lag TEXT  maximum allowed lag\n  --is-sync       check if the replica is synchronous\n  --is-async      check if the replica is asynchronous\n  --help          Show this message and exit.\n```\n\n### node_patroni_version\n\n```\nUsage: check_patroni node_patroni_version [OPTIONS]\n\n  Check if the version is equal to the input\n\n  Check:\n  * `OK`: The version is the same as the input `--patroni-version`\n  * `CRITICAL`: otherwise.\n\n  Perfdata:\n  * `is_version_ok` is 1 if version is ok, 0 otherwise\n\nOptions:\n  --patroni-version TEXT  Patroni version to compare to  [required]\n  --help                  Show this message and exit.\n```\n\n### node_tl_has_changed\n\n```\nUsage: check_patroni node_tl_has_changed [OPTIONS]\n\n  Check if the timeline has changed.\n\n  Note: either a timeline or a state file must be provided for this service to\n  work.\n\n  Check:\n  * `OK`: The timeline is the same as last time (`--state_file`) or the inputted timeline (`--timeline`)\n  * `CRITICAL`: The tl is not the same.\n\n  Perfdata:\n  * `is_timeline_changed` is 1 if the tl has changed, 0 otherwise\n  * the timeline\n\nOptions:\n  --timeline TEXT        A timeline number to compare with.\n  -s, --state-file TEXT  A state file to store the last tl number into.\n  --save                 Set the current timeline number as the reference for\n                         future calls.\n  --help                 Show this message and exit.\n```\n\n\n",
    "bugtrack_url": null,
    "license": "PostgreSQL",
    "summary": "Nagios plugin to check on patroni",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://github.com/dalibo/check_patroni"
    },
    "split_keywords": [
        "patroni",
        "nagios",
        "check"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbc7b6a3628503eef9221fe2d3eb32fb278995fda295e59fc3c04a0c02875d8f",
                "md5": "72905894f79ff2cfa49fd3dabc103e33",
                "sha256": "d32e89e878137392ccfeb45ae83e5aa94882f624c3a1135ad9b83cb3c39c9d15"
            },
            "downloads": -1,
            "filename": "check_patroni-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "72905894f79ff2cfa49fd3dabc103e33",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 17673,
            "upload_time": "2023-08-28T10:12:57",
            "upload_time_iso_8601": "2023-08-28T10:12:57.463575Z",
            "url": "https://files.pythonhosted.org/packages/db/c7/b6a3628503eef9221fe2d3eb32fb278995fda295e59fc3c04a0c02875d8f/check_patroni-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d543f990e0f78e1a4d4ed5948776673191e121cac8c731f1ad569b0514205008",
                "md5": "6b653a826f436f3f5833f09fea7ef584",
                "sha256": "918b7ee356242f9181e1d53687a67b0afe34ce9e92d5422d96a76a818632a795"
            },
            "downloads": -1,
            "filename": "check_patroni-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "6b653a826f436f3f5833f09fea7ef584",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 29081,
            "upload_time": "2023-08-28T10:12:59",
            "upload_time_iso_8601": "2023-08-28T10:12:59.233384Z",
            "url": "https://files.pythonhosted.org/packages/d5/43/f990e0f78e1a4d4ed5948776673191e121cac8c731f1ad569b0514205008/check_patroni-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-28 10:12:59",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "dalibo",
    "github_project": "check_patroni",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "tox": true,
    "lcname": "check-patroni"
}
        
Elapsed time: 0.10417s