Bot for measuring latency of whisper messages
Go to file
Jakub Sokołowski 5c553b08ff
formatting
2018-06-28 14:17:47 +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 2018-06-15 21:35:20 +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 formatting 2018-06-28 14:17:47 +02:00
README.md update README with info about docker image 2018-06-15 17:37:15 +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 Initial commit 2018-05-24 18:32:39 +03:00
sender.go Add Prometheus metrics 2018-05-24 18:51:16 +03:00
stats.go add basic healthcheck 2018-06-15 17:07:48 +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. Default listen port is 8008. Use -statsPort flag to change it.

Currently exposed metrics:

  • msgs_sent
  • msgs_received
  • msgs_responses_latency

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