p2p-health-bot/README.md

66 lines
1.3 KiB
Markdown
Raw Permalink Normal View History

2018-05-24 15:58:54 +00:00
# P2P Health checking bot
---
This bot measures latency for Status messages (complete roundtrip).
It operates in two modes: sender and receiver. Sends sends health check messages periodically, and tracks responses from receiver bot.
# Installation
```
go get github.com/status-im/p2p-health-bot
```
2018-05-24 15:59:39 +00:00
You may also want to run `dep ensure` to use deps versions used at the moment of writing package.
2018-05-24 15:58:54 +00:00
# Usage
### First node
Start statusd:
```
./statusd -shh=true -standalone=false -http=true -status=http -networkid=1
```
Then, start bot in a sender mode:
```
p2p-health-bot
```
### Second node
Start statusd (make sure, it's the same network):
```
./statusd -shh=true -standalone=false -http=true -status=http -networkid=1
```
Then, start bot in a receiver mode:
```
p2p-health-bot -send=false
```
See `p2p-health-bot --help` for more options.
### Metrics
2018-06-21 09:15:04 +00:00
Metrics are exposed in Prometheus format on `/metrics` endpoint of **sender** node only. Default listen port is 8008. Use `-statsPort` flag to change it.
2018-05-24 15:58:54 +00:00
Currently exposed metrics:
- `msgs_sent`
- `msgs_received`
- `msgs_responses_latency`
2018-06-21 09:20:13 +00:00
Latency is in milliseconds.
2018-05-24 15:58:54 +00:00
### Deployment
This software is deployed via Docker image built with `Dockerfile` ran from the `Makefile`. The image is then pushed to:
https://hub.docker.com/r/statusteam/p2p-health-bot/
2018-05-24 15:58:54 +00:00
# License
MIT