Skip to content
This repository has been archived by the owner on May 11, 2022. It is now read-only.

Latest commit

 

History

History
73 lines (51 loc) · 1.67 KB

README.md

File metadata and controls

73 lines (51 loc) · 1.67 KB

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

Deprecated in favour of https://github.com/osmosis-labs/osmosis-rpc-healthcheck

⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️⚠️

rpc-fetching-blocks-healthcheck

Simple controller written in python that serves an healthcheck to determine if an rpc node is synced and fetching blocks.

Run

Locally

Run locally:

pip install -r requirements.txt
make start

usage

Docker

Build the image:

make build

Specify the rpc node to check:

export RPC_NODE=https://rpc-osmosis.blockapsis.com/

Run:

docker run \
    -p 8080:8080 \
    -e RPC_NODE=$(RPC_NODE) \
    -e CHECK_INTERVAL=10 \
    -e NEW_BLOCK_THRESHOLD=30 \
    --name sync-controller \
    sync-controller:$(TAG) 

Usage

The controller exposes a simple REST Endpoint that:

  • Responds with a 200 status code if the rpc is fetching blocks
  • Responds with a 503 status code if the rpc is not fetching blocks

Example:

curl -X GET --head http://0.0.0.0:8080 
HTTP/1.1 200 OK

Alarms

The healthcheck can be configured to send alarms via slack webhooks:

export SLACK_WEBHOOK="https://hooks.slack.com/services/T..."