Use the Validator Status API to query a validator's status, such as whether it is losing blocks, on cheqd.
Summary
We built a network-wide validator status monitoring tool that will send out alerts in case your node starts losing blocks. Join/follow the #mainnet-alerts channel to get these updates.
How it works/how we built it
Our exposes a GraphQL endpoint. This GraphQL endpoint is what the block explorer front-end uses when showing .
To simplify parsing the output from the GraphQL endpoint, we did into simple JSON.
Alerting
To simplify the task of alerting via various channels (and to keep it extensible to other channels), we take the output of our validator status API and parse it via . This is done as a two-stage process via two separate “Zaps”.
Collating a list of validators missing blocks
to wake up the “Zap” every hour
Run custom JavaScript code using to parse the JSON output
You can copy this Zap to configure a similar setup for other alert channels, such as or .
to check if there are entries generated in the compromised validator list. If not, then terminate Zap execution.
If the execution has reached this stage, with the following sub-steps:
to carry out text/number formatting.
to push the formatted bullet-list item with validator details into a compiled digest.
Sending an alert to designated alert channel: A separate Zap triggers and sends alerts to designated channels. Right now, our setup sends these details to the and the .
Similar to above, Schedule by Zapier to wake the Zap up every hour
“Release” any unreleased digests by using .
Filter by Zapier to check if there are any entries populated in the digest. If not, terminate execution of any further steps at this stage.
If execution has proceeded to this step, use the and to send a message (with formatting) to designated alert channels.