Skip to content

Network Status Client Setup

Machete edited this page Nov 23, 2018 · 8 revisions

Network Status Monitoring

The Ethereum Classic network status monitor was forked from the Ethereum (centralised) network status monitor (known sometimes as "eth-netstats") is a web-based application to monitor the health of the testnet/mainnet through a group of nodes.

Listing

To list your node, you must install the client-side information relay, a node module. Instructions given here work on Ubuntu (Mac OS X follow same instructions, but sudo may be unnecessary). Other platforms vary (please make sure that nodejs-legacy is also installed, otherwise some modules might fail).

Clone the git repo, then install pm2:

git clone https://github.com/Machete3000/etc-net-intelligence-api
cd etc-net-intelligence-api
npm install
sudo npm install -g pm2

Then edit the app.json file in it to configure for your node:

  • alter the value to the right of LISTENING_PORT to the ethereum listening port (default: 30303)
  • alter the value to the right of INSTANCE_NAME to whatever you wish to name your node;
  • alter the value to the right of CONTACT_DETAILS if you wish to share your contact details
  • alter the value to the right of RPC_PORT to the rpc port for your node (by default 8545 for both cpp and go);
  • and alter the value to the right of WS_SECRET to 5ceuMix4qSM6APj7QwTPU.

ethereum (eth or geth) must be running with rpc enabled.

geth --rpc

the default port (if one is not specified) for rpc under geth is 8545

Finally run the process with:

pm2 start app.json

Several commands are available:

  • pm2 list to display the process status;
  • pm2 logs to display logs;
  • pm2 gracefulReload node-app for a soft reload;
  • pm2 stop node-app to stop the app;
  • pm2 kill to kill the daemon.

Updating

In order to update you have to do the following:

  • git pull to pull the latest version
  • sudo npm update to update the dependencies
  • pm2 gracefulReload node-app to reload the client

Auto-installation on a fresh Ubuntu install

Fetch and run the build shell. This will install everything you need: latest ethereum - CLI from develop branch (you can choose between eth or geth), node.js, npm & pm2.

bash <(curl https://raw.githubusercontent.com/Machete3000/etc-net-intelligence-api/master/bin/build.sh)

Configuration

Configure the app modifying app.json. Note that you have to modify the backup app.json (to allow you to set your env vars without being rewritten when updating).

"env":
	{
		"NODE_ENV"        : "production", // tell the client we're in production environment
		"RPC_HOST"        : "localhost", // eth JSON-RPC host the default is 8545
		"RPC_PORT"        : "8545", // eth JSON-RPC port
		"LISTENING_PORT"  : "30303", // eth listening port (only used for display)
		"INSTANCE_NAME"   : "", // whatever you wish to name your node
		"CONTACT_DETAILS" : "", // add your contact details here if you wish (email/skype)
		"WS_SERVER"       : "ws://rpc.etcstats.net", // path to etc-netstats WebSockets api server
		"WS_SECRET"       : "5ceuMix4qSM6APj7QwTPU", // WebSockets api server secret used for login
	}

Run

Run it using pm2:

cd ~/bin
pm2 start processes.json

ethereum (eth or geth) must be running with rpc enabled.

geth --rpc

the default port (if one is not specified) for rpc under geth is 8545

Updating

To update the API client use the following command:

~/bin/www/bin/update.sh

It will stop the current netstats client processes, automatically detect your ethereum implementation and version, update it to the latest develop build, update netstats client and reload the processes.