Skip to content

Setting up monitoring on local cluster

Kobi Gurkan edited this page Apr 8, 2015 · 11 revisions

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_path is the target directory for the resulting app.json.
  • 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.
  • ws_secret is the eth-netstats secret.

For example:

bash intelligence . 5 mynode http://localhost:3000 big-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!

Clone this wiki locally