Skip to main content

Python library for RPC-healthchecking for graphene blockchains

Project description

# Graphene Backend Healthchecking

## Installation

pip3 install graphene-healthchecker

## Running Health Check

```
Usage: graphenehealth [OPTIONS] URL

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

**Example**:

```
graphenehealth --listen 8080 https://__ENDPOINT__
```

## Deploy with UWSGI

To deploy with UWSGI, please copy the `config-defaults.yml` file
into your working directory and deploy with systemd.

In `backend-health.service`, replace the variables in `{{ ... }}`
and install it in your systemd directory `/etc/systemd/system`.

## Health Check

1. Check if a connection can be established to the backend node.
(Raise HTTP/402 if not.)
2. Check that the returned answer from the backend has status code 200.
(Raise HTTP/402 if not.)
3. Check if the answer has a "result" key in its json representation.
(Raise HTTP/402 if not.)
4. Obtain the time of the most recent block as well as the next
maintenance time
5. Check that current head time is less than 60 seconds old and next
maintenance interval is more than 10 seconds in the future.
(Raise HTTP/402 if not.)


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

graphene-healthchecker-0.1.4.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

graphene_healthchecker-0.1.4-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file graphene-healthchecker-0.1.4.tar.gz.

File metadata

  • Download URL: graphene-healthchecker-0.1.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.6.4

File hashes

Hashes for graphene-healthchecker-0.1.4.tar.gz
Algorithm Hash digest
SHA256 59a55d687e5cb89a80c2cb84b7e72b1d50c0bf154bd0263c46f93f461ea591cb
MD5 e6bd6e0fc7244ddccdcf401c77df4766
BLAKE2b-256 7e3ec434c3b1416dc0c3c798baadf66852cdcbe1b5e6b84421b00e9490120584

See more details on using hashes here.

File details

Details for the file graphene_healthchecker-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: graphene_healthchecker-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.15.0 CPython/3.6.4

File hashes

Hashes for graphene_healthchecker-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fe36f01f0d47c1854a973f625e986ca2ff430dcb9e314c9195811ef4980cd475
MD5 5647b3e75ef078b550c8727578ba6964
BLAKE2b-256 f899012b33e823f7cdb3c37447af890353d3cb1a626cd2bc12613c803bbf2fc1

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