Bot for measuring latency of whisper messages
Go to file
Ivan Danyliuk ef8dcab086
Merge branch 'master' of github.com:status-im/p2p-health-bot
2018-06-28 16:41:20 +02:00
.gitignore Add deps and readme 2018-05-24 18:58:54 +03:00
Dockerfile add metadata to image and tag both with commit and latest (#3) 2018-06-28 15:54:06 +02:00
Gopkg.lock Add deps and readme 2018-05-24 18:58:54 +03:00
Gopkg.toml Add deps and readme 2018-05-24 18:58:54 +03:00
Makefile add metadata to image and tag both with commit and latest (#3) 2018-06-28 15:54:06 +02:00
README.md Update README.md 2018-06-21 11:20:13 +02:00
main.go Add Prometheus metrics 2018-05-24 18:51:16 +03:00
msg.go Initial commit 2018-05-24 18:32:39 +03:00
receiver.go Make vet happy 2018-06-28 13:48:36 +02:00
sender.go Add Prometheus metrics 2018-05-24 18:51:16 +03:00
stats.go Add more buckets to histogram 2018-06-28 16:40:43 +02:00

README.md

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

You may also want to run dep ensure to use deps versions used at the moment of writing package.

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

Metrics are exposed in Prometheus format on /metrics endpoint of sender node only. Default listen port is 8008. Use -statsPort flag to change it.

Currently exposed metrics:

  • msgs_sent
  • msgs_received
  • msgs_responses_latency

Latency is in milliseconds.

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/

License

MIT