How to build Ethereum Dashboard and to monitor your Ethereum Network Status

胡家維 Hu Kenneth
Coinmonks
5 min readDec 13, 2018

--

Let’s build a visual interface for tracking ethereum network status and to reporting anything about private/public ethereum network.

DashBoard

Architecture

  • eth-netstats : This is a visual interface for tracking ethereum network status. It uses WebSockets to receive stats from running nodes and output them through an angular interface.
  • eth-net-intelligence-api : This is the backend service which runs along with ethereum and tracks the network status, fetches information through JSON-RPC and connects through WebSockets to eth-netstats to feed information. For full install instructions please read the wiki.
  • Ethereum node (it can be private node or public node)

Discover and review best Blockchain analytics softwares

Prerequisite

Here are the steps:

  1. execute ethereum private/public node
  2. Download and Install Tools
  3. Configure the Node Monitoring App
  4. Start the Node App
  5. Start the Frontend

Folder structure

1. Execute ethereum private/public node

If you are unfamiliar with how to do this, please refer to my previous article for a step-by-step guide. To execute Ethereum private node the following command:

2. Download and Install Tools

To clone and install eth-netsates run the following command:

To clone and install eth-net-intelligence-api run the following command:

3. Configure the Node Monitoring App

We will need to modify the app.json file located in the eth-net-intelligence-api directory:

There are few configurations that need to be changed in this file.

  • "name": The name that will appear for your node app in the pm2 process manager (see next section for more details on pm2)
  • "RPC_HOST": The IP address for the machine hosting your running gethinstance
  • "RPC_PORT": The RPC port that your geth instance is running on
  • "LISTENING_PORT": The network listening port for your geth instance
  • "INSTANCE_NAME": The name that will appear on the dashboard in your browser for this particular node
  • "WS_SERVER": The server address for the frontend UI (i.e. eth-netstats) running in background
  • "WS_SECRET": The secret used to allow the frontend to connect eth-net-intelligence-api. You choose any value to put here.

In app.json, we have to modify three parameters, namely INSTANCE_NAME, WS_SERVER andWS_SECRET.

You can get INSTANCE_NAME from private chain information.

WS_SERVER will point eth-netstats so we use eth-netstats' default url : http://localhost:3000

We set WS_SECRET = "mysecret"

Finally app.json

4. Start The Node App

4.1 We execute the backend tool ( eth-net-intelligence-api) run the following command:

Result

4.2 execute the front-end tool (eth-netstats ) run the following command:

4.3 Issues:

You might encounter two issues- No action and wrong auth

4.3.1 No action

solution :

My solution is restart eth-net-intelligence-api again

4.3.2 wrong auth as the following figure.

solution :

My solution is check my command and ws_secret, restart eth-net-intelligence-api and then run my eth-netstats command again.

5. Start the Frontend

visit http://localhost:3000 in your web browser. If you notice that no node are listed in the monitoring dashboard. This is because no instance of geth is currently running or your eth-net-intelligence-api does not connect to the node.

Any problem ??

watch my video — https://www.youtube.com/watch?v=xgf3zQNqYVM

I do this because I love it, but if you want me to buy me a cup of coffee I won’t say no :O )

donation :

XEM : NCWZSUF4FPXJY3L3Y7657QNVBIUZ5D54F4TNJ64S

Ether : 0xf2d15dEAf62b8c4AFC0343006579E8E662c120D9

Bitcoin : 332UiyAfSXyvhqCYgDgBkNLFSf25ccNV9i

  • *Do CLAP, COMMENT and SHARE! I also welcome any business opportunities that arises**
Click to read today’s top story

--

--

胡家維 Hu Kenneth
Coinmonks

撰寫任何事情,O型水瓶混魔羯,咖啡愛好者,Full stack/blockchain Web3 developer,Founder of Blockchain&Dapps meetup ,Udemy teacher。 My Linktree: https://linktr.ee/kennethhutw