mirror of https://github.com/hyperledger/besu
An enterprise-grade Java-based, Apache 2.0 licensed Ethereum client https://wiki.hyperledger.org/display/besu
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
169 lines
5.7 KiB
169 lines
5.7 KiB
6 years ago
|
description: Alethio EthStats Lite network monitor
|
||
6 years ago
|
<!--- END of page meta data -->
|
||
|
|
||
6 years ago
|
# Alethio EthStats Lite (network monitor)
|
||
6 years ago
|
|
||
6 years ago
|
Use [EthStats Lite](https://github.com/Alethio?utf8=%E2%9C%93&q=ethstats&type=&language=javascript)
|
||
6 years ago
|
to have a live view of private network health by displaying real time and historical statistics
|
||
|
about the network and nodes.
|
||
6 years ago
|
|
||
6 years ago
|
EthStats Lite supports in-memory persistence or using Redis to persist a fixed number of blocks
|
||
6 years ago
|
(by default, 3000).
|
||
6 years ago
|
|
||
6 years ago
|
You can also use a full online version of EthStats for the [Ethereum MainNet](https://ethstats.io).
|
||
6 years ago
|
|
||
|
!!! note
|
||
6 years ago
|
The EthStats Lite is an [Alethio product](https://company.aleth.io/developers).
|
||
6 years ago
|
|
||
|
!!! tip
|
||
6 years ago
|
Static local ports 80 and 3000 are used in the example [running EthStats Lite
|
||
|
for a Pantheon Node](#running-ethstats-lite-for-a-pantheon-node).
|
||
6 years ago
|
|
||
|
## Statistics
|
||
|
|
||
6 years ago
|
Statistics displayed by EthStats Lite include:
|
||
6 years ago
|
|
||
|
* Nodes in the network. Metrics for nodes include:
|
||
|
- Information about the last received block such as block number,
|
||
|
block hash, transaction count, uncle count, block time and propagation time
|
||
|
- Connected peers, whether the node is mining, hash rate, latency, and uptime
|
||
|
* Charts for Block Time, Block Difficulty, Block Gas Limit, Block Uncles, Block Transactions, Block Gas Used,
|
||
|
Block Propagation Histogram, and Top Miners
|
||
|
* IP based geolocation overview
|
||
|
* Node logs. Node logs display the data sent by a node
|
||
|
* Block history. Block history provides the ability to go back in time and playback the block propagation
|
||
|
through the nodes
|
||
|
|
||
|
## Components
|
||
|
|
||
6 years ago
|
EthStats Lite consists of:
|
||
6 years ago
|
|
||
|
* [Server](https://github.com/Alethio/ethstats-network-server). Consumes node data received from the
|
||
|
client.
|
||
|
|
||
|
* [Client](https://github.com/Alethio/ethstats-cli). A client must be started for each node in the network.
|
||
|
The client extracts data from the node and sends it to the server
|
||
|
|
||
|
* [Dashboard](https://github.com/Alethio/ethstats-network-dashboard). Dashboard displaying [statistics](#statistics).
|
||
|
|
||
|
## Pre-requisities
|
||
|
|
||
|
[Docker](https://docs.docker.com/install/)
|
||
|
|
||
|
!!! tip
|
||
6 years ago
|
EthStats Lite has a number of dependencies. Using Docker is the easiest way to
|
||
|
use EthStats Lite with Pantheon.
|
||
6 years ago
|
|
||
|
The [EthStats CLI](https://github.com/Alethio/ethstats-cli),
|
||
6 years ago
|
[EthStats Network Server](https://github.com/Alethio/ethstats-network-server), and [EthStats Network
|
||
6 years ago
|
Dashboard](https://github.com/Alethio/ethstats-network-dashboard) documentation describes how to
|
||
6 years ago
|
install EthStats Lite tools.
|
||
6 years ago
|
|
||
6 years ago
|
## Running EthStats Lite for a Pantheon Node
|
||
6 years ago
|
|
||
6 years ago
|
!!! important
|
||
6 years ago
|
This example describes how to run EthStats Lite for a single Pantheon node.
|
||
|
To run EthStats Lite for a network of nodes, a [client](#3-client) must be started for each node.
|
||
6 years ago
|
|
||
|
### 1. Server
|
||
|
|
||
6 years ago
|
Start the EthStats Lite server using in-memory persistence:
|
||
6 years ago
|
|
||
|
1. Clone the server repository:
|
||
|
|
||
|
```bash
|
||
|
git clone https://github.com/Alethio/ethstats-network-server.git
|
||
|
```
|
||
|
|
||
6 years ago
|
1. Change into the `/ethstats-network-server/docker/lite-mode/memory-persistence` directory:
|
||
6 years ago
|
|
||
|
```bash
|
||
|
cd ethstats-network-server/docker/lite-mode/memory-persistence
|
||
|
```
|
||
|
|
||
6 years ago
|
1. Update the `docker-compose.yml` file to your Pantheon [network ID](../../Configuring-Pantheon/NetworkID-And-ChainID.md):
|
||
6 years ago
|
|
||
|
```yaml
|
||
|
- NETWORK_ID=2018
|
||
|
- NETWORK_NAME=mynetwork
|
||
|
```
|
||
|
|
||
6 years ago
|
In this example we are using the `dev` Pantheon network with a network ID of `2018`.
|
||
6 years ago
|
|
||
|
1. Start the server using Docker compose:
|
||
6 years ago
|
|
||
|
```bash
|
||
|
docker-compose up -d
|
||
|
```
|
||
|
|
||
|
!!! tip
|
||
6 years ago
|
A `docker-compose` file is provided in the `ethstats-network-server/docker/lite-mode/redis-persistence`
|
||
6 years ago
|
directory to run the server using Redis to persist a fixed number of blocks (default is 3000).
|
||
|
|
||
|
### 2. Pantheon
|
||
|
|
||
6 years ago
|
Start Pantheon in development mode with WebSockets enabled:
|
||
6 years ago
|
|
||
|
```bash
|
||
|
docker run --rm -p 8546:8546 pegasyseng/pantheon:latest --miner-enabled --miner-coinbase fe3b557e8fb62b89f4916b721be55ceb828dbd73 --rpc-http-cors-origins="all" --rpc-ws-enabled --network=dev
|
||
|
```
|
||
|
|
||
|
Where `<pantheondata-path>` is the volume to which the node data is saved.
|
||
|
|
||
|
### 3. Client
|
||
|
|
||
|
Start the client for the Pantheon node:
|
||
|
|
||
|
```bash
|
||
6 years ago
|
docker run -d --rm --name ethstats-client --net host alethio/ethstats-cli --register --account-email <email> --node-name <node_name> --server-url http://localhost:3000 --client-url ws://127.0.0.1:8546
|
||
6 years ago
|
```
|
||
|
|
||
|
Where:
|
||
|
|
||
|
* `--server-url` specifies [your server](#1-server). The default is the server that consumes data for the Ethereum MainNet.
|
||
|
* `--register` specifies the registration of the Pantheon node is done automatically with the specified `<email>` and `<node_name>`.
|
||
|
Registering the node is only required the first time the client is started for the node.
|
||
|
* `--client-url` specifies the WebSockets URL for the Pantheon node.
|
||
|
|
||
|
### 4. Dashboard
|
||
|
|
||
6 years ago
|
To display EthStats Lite dashboard, open [http://localhost](http://localhost) in your browser.
|
||
6 years ago
|
|
||
6 years ago
|
![Alethio EthStats Lite Dashboard](ethstats.png)
|
||
6 years ago
|
|
||
|
!!! note "Default HTTP port"
|
||
6 years ago
|
We are using the default HTTP port (80) to run EthStats Lite. The [Lite Block Explorer](Lite-Block-Explorer.md)
|
||
6 years ago
|
example uses port 8080. You can then run both at the same time.
|
||
|
|
||
|
To change the port, update the `docker-compose.yml` file:
|
||
|
```yaml
|
||
|
ports:
|
||
|
- 127.0.0.1:80:80
|
||
|
```
|
||
|
|
||
|
Update the first 80 to the required port:
|
||
|
```yaml
|
||
|
ports:
|
||
|
- 127.0.0.1:8081:80
|
||
|
```
|
||
6 years ago
|
|
||
|
### Stopping and Cleaning Up Resources
|
||
|
|
||
6 years ago
|
When you've finished running EthStats Lite:
|
||
6 years ago
|
|
||
|
1. Stop Pantheon using ++ctrl+c++.
|
||
|
|
||
6 years ago
|
1. Stop EthStats Lite server and remove containers and volumes:
|
||
6 years ago
|
|
||
|
```bash
|
||
|
docker-compose down -v
|
||
|
```
|
||
|
|
||
6 years ago
|
1. Stop EthStats Lite client:
|
||
6 years ago
|
|
||
|
```bash
|
||
6 years ago
|
docker stop ethstats-client
|
||
|
```
|
||
|
|
||
|
!!! tip
|
||
|
The client container is automatically removed because we used the `--rm` option.
|