Skip to content

Commit

Permalink
chore(networkmonitor): update README
Browse files Browse the repository at this point in the history
  • Loading branch information
alrevuelta committed Nov 1, 2022
1 parent 6243271 commit 4a6f160
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions tools/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ Monitoring tool to run in an existing `waku` network with the following features
* Tracks advertised capabilities of each node as per stored in the ENR `waku` field
* Attempts to connect to all nodes, tracking which protocols each node supports
* Presents grafana-ready metrics showing the state of the network in terms of locations, ips, number discovered peers, number of peers we could connect to, user-agent that each peer contains, etc.
* Metrics are exposed through prometheus metrics but also with a custom rest api, presenting detailed information about each peer.

### Usage

Expand All @@ -70,6 +71,8 @@ The following options are available:
--metrics-server Enable the metrics server: true|false [=true].
--metrics-server-address Listening address of the metrics server. [=ValidIpAddress.init("127.0.0.1")].
--metrics-server-port Listening HTTP port of the metrics server. [=8008].
--metrics-rest-address Listening address of the metrics rest server. [=127.0.0.1].
--metrics-rest-port Listening HTTP port of the metrics rest server. [=8009].
```

### Example
Expand All @@ -83,14 +86,16 @@ Connect to the network through a given bootstrap node, with default parameters.

### metrics

The following metrics are available:
The following metrics are available. See `http://localhost:8008/metrics`

* peer_type_as_per_enr: Number of peers supporting each capability according the the ENR (Relay, Store, Lightpush, Filter)
* peer_type_as_per_protocol: Number of peers supporting each protocol, after a successful connection)
* discovered_peers_list: List of discovered peers with extra information on each of them
* connected_peers_list: List of peers that we connected to with extra information on each one
* peer_user_agents: List of useragents found in the network and their count

Other relevant metrics reused from `nim-eth`:
* routing_table_nodes: Inherited from nim-eth, number of nodes in the routing table
* discovery_message_requests_outgoing_total: Inherited from nim-eth, number of outging discovery requests, useful to know if the node is actiely looking for new peers
* discovery_message_requests_outgoing_total: Inherited from nim-eth, number of outging discovery requests, useful to know if the node is actiely looking for new peers

The following metrics are exposed via a custom rest api. See `http://localhost:8009/allpeersinfo`

* json list of all peers with extra information such as ip, locatio, supported protocols and last connection time.

0 comments on commit 4a6f160

Please sign in to comment.