A real-time monitoring tool for the Cosmos consensus status.
The monitor is made up of two parts:
- A websockets server that provides updates triggered by Cosmos node events.
- A web client that opens a websockets connection to the server.
- Requires Python 3.10
- Clone repo:
git clone git@github.com:hyphacoop/cosmos-consensus-monitor.git
- Change directory:
cd cosmos-consensus-monitor
- Create a python virtual environment:
python -m venv .env
- Source env shell vars:
source .env/bin/activate
- Install requirements:
pip install -r requirements.txt
The syntax for the websockets server is as follows:
server/consensus_monitor_server.py --api <api_server_node> --rpc <rpc_server_node> --port <websockets_port>
api_server_node
andrpc_server_node
are requiredport
is set to 9001 by default
You can run the websockets server as a service:
- Modify the
monitor-ws-server.service
file with adequate user name, path, and RPC/API node entries. - Make a copy of
monitor-ws-server.service
or create a link to it in/etc/systemd/system/
. - Enable and start the service:
systemctl daemon-reload
systemctl enable monitor-ws-server.service
systemctl start monitor-ws-server.service
systemctl status monitor-ws-server.service
You can serve the web client using the http
package:
python -m http.server --directory client/
consensus.js
uses port 9001 to connect to the Websockets server by default.
You can run the http server as a service:
- Modify the
monitor-ui-server.service
file with adequate user name, path, and port entries. - Make a copy of
monitor-ui-server.service
or create a link to it in/etc/systemd/system/
. - Enable and start the service:
systemctl daemon-reload
systemctl enable monitor-ui-server.service
systemctl start monitor-ui-server.service
systemctl status monitor-ui-server.service