⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ Deprecated in favour of https://github.com/osmosis-labs/osmosis-rpc-healthcheck
⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️ ⚠️
Simple controller written in python that serves an healthcheck to determine if an rpc node is synced and fetching blocks.
Run locally:
pip install -r requirements.txt
make start
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)
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
The healthcheck can be configured to send alarms via slack webhooks:
export SLACK_WEBHOOK="https://hooks.slack.com/services/T..."