Onomy Node Monitor by Cosmos.Holdings
A Command Line / Cron tool for verifying Eth & Onomy Block Heights as well as Orchestrator Health
- Monitors Onomy and Eth Block Heights against Public Nodes
- Monitors Onomy Orchestrator 'gbt' Process and Validator 'Status' on the blockchain.
- Node v16+
- Locally running Onomy or Eth Nodes
- Installed omg
- onomyd & omg in PATH
- Free Etherscan.io Account & API Key
- Free Healthchecks.io Account & Ping Key (Look within project settings to define your Ping Key)
Clone Repository & Install Dependencies
git clone https://github.com/Twenty7/onomy-monitor.git
cd onomy-monitor
npm install
- Add the Etherscan.io and Healthchecks.io Keys to the config.json file
- Add your Validator Name to config.json
- Update any Public or Local Hostnames & Ports
cp config/production.example.json config/production.json
- In your healthchecks.io Project, you will need to create checks for each process and node you want to monitor. One for
eth
, another foronomy
, and another foronomy orchestrator
. Name each check using the nodehostname
and previous process type. The monitor script uses a 'slug' based check that will create a URL from the Check Name, so they must be exact. It is recommended to set a Period of 5 minutes and Grace Time of 11 minutes, adjust as desired to be more or less sensitive.
Healthchecks.io Name Examples for two sentry nodes and one validator node:
{Hostname} {Chain} {Network}
nomsentry1 Eth Mainnet
nomsentry1 Onomy Mainnet
nomsentry1 Onex Mainnet
nomsentry2 Eth Mainnet
nomsentry2 Onomy Mainnet
nomsentry2 Onex Mainnet
nomvalidator Eth Mainnet
nomvalidator Onomy Mainnet
nomvalidator Onex Mainnet
nomvalidator Onomy Validator Mainnet
hermes Mainnet
The first example should result in a Healthcheck slug of nomsentry1-eth-mainnet
- Add Crontab entries on each node for each process.
crontab -e
* * * * * /usr/local/onomy-monitor/monitor.js eth mainnet >> /var/log/onomy-monitor.log
* * * * * /usr/local/onomy-monitor/monitor.js onomy mainnet >> /var/log/onomy-monitor.log
* * * * * /usr/local/onomy-monitor/monitor.js onex mainnet >> /var/log/onomy-monitor.log
* * * * * bash -lc '/usr/local/onomy-monitor/monitor.js onomy_validator mainnet >> /var/log/onomy-monitor.log'
* * * * * /usr/local/onomy-monitor/monitor.js hermes mainnet >> /var/log/onomy-monitor.log