2022-09-09 07:28:25 -05:00
|
|
|
---
|
|
|
|
title: Monitoring with Ethstats
|
|
|
|
description: Setting up an Ethstats server
|
|
|
|
---
|
|
|
|
|
|
|
|
Ethstats is a service that displays real time and historical statistics about individual
|
|
|
|
nodes connected to a network and about the network itself. Individual node statistics include
|
|
|
|
the last received block, block time, propagation time, connected peers, latency etc. Network
|
|
|
|
metrics include the number of nodes, average block times, node geolocation,
|
|
|
|
transaction counts etc.
|
|
|
|
|
|
|
|
These statistics are presented to the user in the form of a dashboard served to a web browser.
|
|
|
|
This can be configured using the public Ethstats server for Ethereum mainnet or some
|
|
|
|
public testnets, or using a local copy of Ethstats for private networks. This page will
|
|
|
|
demonstrate how to set up an Ethstats dashboard for private and public networks.
|
|
|
|
|
2022-11-25 11:34:46 -06:00
|
|
|
## Prerequisites {#prerequisites}
|
2022-09-09 07:28:25 -05:00
|
|
|
|
|
|
|
To follow the instructions on this page the following are required:
|
|
|
|
|
|
|
|
- Geth
|
|
|
|
- Node
|
|
|
|
- NPM
|
|
|
|
- Git
|
|
|
|
|
2022-11-25 11:34:46 -06:00
|
|
|
## Ethstats {#ethstats}
|
2022-09-09 07:28:25 -05:00
|
|
|
|
|
|
|
Ethstats has three components:
|
|
|
|
|
|
|
|
- a server that consumes data sent to it by each individual node on a network and serves
|
|
|
|
statistics generated from that data.
|
2022-11-30 11:22:24 -06:00
|
|
|
|
2022-09-09 07:28:25 -05:00
|
|
|
- a client that queries a node and sends its data to the server
|
2022-11-30 11:22:24 -06:00
|
|
|
|
2022-09-09 07:28:25 -05:00
|
|
|
- a dashboard that displays the statistics generated by the server
|
|
|
|
|
|
|
|
The summary dashboard for Ethereum Mainnet can be viewed at [ethstats.net](https://ethstats.net/).
|
|
|
|
|
2022-09-30 08:26:00 -05:00
|
|
|
![Ethstats](/images/docs/ethstats-mainnet.png)
|
2022-09-09 07:28:25 -05:00
|
|
|
|
|
|
|
Note that the Ethstats dashboard is not a reliable source of information about the entire Ethereum
|
|
|
|
network because submitting data to the Ethstats server is voluntary and has to be configured by
|
|
|
|
individual nodes. Therefore, many nodes are omitted from the summary statistics.
|
|
|
|
|
2022-11-25 11:34:46 -06:00
|
|
|
## How to use {#how-to-use}
|
2022-09-09 07:28:25 -05:00
|
|
|
|
|
|
|
To report statistics about the local node to Ethstats, an Ethstats server and Ethstats client both have
|
|
|
|
to be installed alongside Geth. There are several options for installing Ethstats clients and servers,
|
|
|
|
each with detailed installation instructions. They all share the common trait that an Ethstats service is
|
|
|
|
started with a specific URL that can be passed to Geth.
|
|
|
|
|
|
|
|
[EthNetStats "Classic"](https://github.com/ethereum/eth-netstats)
|
2022-11-30 18:06:59 -06:00
|
|
|
|
2022-09-09 07:28:25 -05:00
|
|
|
[EthNet Intelligence API](https://github.com/ethereum/eth-net-intelligence-api)
|
2022-11-30 18:06:59 -06:00
|
|
|
|
2022-09-09 07:28:25 -05:00
|
|
|
[Goerli Ethstats client](https://github.com/goerli/ethstats-client)
|
2022-11-30 18:06:59 -06:00
|
|
|
|
2022-09-09 07:28:25 -05:00
|
|
|
[Goerli Ethstats server](https://github.com/goerli/ethstats-server)
|
|
|
|
|
|
|
|
If enabled, Geth spins up a minimal Ethstats reporting daemon that pushes statistics about the
|
|
|
|
local node to the Ethstats server.
|
|
|
|
|
|
|
|
To enable this, start Geth with the `ethstats` flag, passing the Ethstats service (nodename:secret@host:port) URL.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
geth <other commands> --ethstats node1:secret:127.0.0.1:9000
|
|
|
|
```
|
|
|
|
|
|
|
|
The local node will then report to Ethstats, and the statistics will be displayed in a dashboard that can be
|
|
|
|
accessed via the web browser.
|
|
|
|
|
2022-11-25 11:34:46 -06:00
|
|
|
## Note on WS_secret {#note-on-ws-secret}
|
2022-09-09 07:28:25 -05:00
|
|
|
|
|
|
|
The `WS_secret` parameter is required for connecting to an Ethstats server. For a local network this can be user-defined
|
|
|
|
on startup by providing it as an environment variable. However, for Ethereum mainnet and the public testnets predefined
|
|
|
|
values must be known. Historically these have been made available on Gitter and Skype channels or of a forum, but these are
|
|
|
|
no longer in use. The user will have to track down existing Ethstats users to request the `WS_secret`.
|