Setting Up Monitoring on a 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 (gethcluster.sh).
The monitoring system consists of two components:
eth-netstats - the monitoring site which lists the nodes.
eth-net-intelligence-api - these are processes that communicate with the Ethereum client using RPC and push the data to the monitoring site via websockets.
#Monitoring site Clone the repo and install dependencies:
Then choose a secret and start the app:
You can now access the (empty) monitoring site at http://localhost:3000
.
You can also choose a different port:
#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:
Now, use this script (netstatconf.sh) to create an app.json
suitable for pm2.
Usage:
number_of_clusters
is the number of nodes in the cluster.name_prefix
is a prefix for the node names as will appear in the listing.ws_server
is the eth-netstats server. Make sure you write the full URL, for example: http://localhost:3000.ws_secret
is the eth-netstats secret.
For example:
Run the script and copy the resulting app.json
into the eth-net-intelligence-api
directory. Afterwards, cd
into eth-net-intelligence-api
and run the relays using pm2 start app.json
. To stop the relays, you can use pm2 delete app.json
.
NOTE: The script assumes the nodes have RPC ports 8101, 8102, ... If that's not the case, edit app.json and change it accordingly for each peer.
At this point, open http://localhost:3000
and your monitoring site should monitor all your nodes!
Last updated