-
Notifications
You must be signed in to change notification settings - Fork 21.4k
Setting up monitoring on local cluster
This page describes how to set up a monitoring site, like this one, for your private network. It builds upon this wiki article and assumes you've created a local cluster using this script (cluster).
#Monitoring site Clone the repo and install dependencies:
git clone https://github.com/cubedro/eth-netstats
cd eth-netstats
npm install
Then choose a secret and start the app:
WS_SECRET=<chosen_secret> npm start
You can now access the (empty) monitoring site at http://localhost:3000.
You can also choose a different port:
PORT=<chosen_port> WS_SECRET=<chosen_secret> npm start
#Client-side information relays These processes will relay the information from each of your cluster nodes to the monitoring site using websockets.
Clone the repo, install dependencies and make sure you have pm2 installed:
git clone https://github.com/cubedro/eth-net-intelligence-api
cd eth-net-intelligence-api
npm install
sudo npm install -g pm2
Now, use this script (intelligence) to create an app.json suitable for pm2.
Usage:
bash intelligence <destination_app_json_path> <number_of_clusters> <name_prefix> <ws_server> <ws_secret>
-
destination_app_json_pathis the target directory for the resulting app.json. -
number_of_clustersis the number of nodes in the cluster. -
name_prefixis a prefix for the node names as will appear in the listing. -
ws_serveris the eth-netstats server. -
ws_secretis the eth-netstats secret.
Run the script and copy the resulting app.json into the eth-net-intelligence-api directory. Afterwards, cd into eth-netstats and run the relays using pm2 start app.json. To stop the relays, you can use pm2 delete app.json.
At this point, your monitoring site should monitor all your nodes!