tendermint/tm-monitor
Anton Kaliaev fd3dc5f5a7
improve ton output
2017-03-06 12:31:53 +04:00
..
mock tm-monitor 0.1.0 2017-03-01 23:01:52 +04:00
Dockerfile link 2 docker containers 2017-03-02 22:14:32 +04:00
Dockerfile.dev tm-monitor 0.1.0 2017-03-01 23:01:52 +04:00
LICENSE tm-monitor 0.1.0 2017-03-01 23:01:52 +04:00
Makefile Dockerfile and Makefile 2017-03-02 22:03:35 +04:00
README.md improve ton output 2017-03-06 12:31:53 +04:00
glide.lock set network's `NumValidators` and node's `IsValidator` 2017-03-02 12:53:05 +04:00
glide.yaml set network's `NumValidators` and node's `IsValidator` 2017-03-02 12:53:05 +04:00
main.go Dockerfile and Makefile 2017-03-02 22:03:35 +04:00
monitor.go differentiate between monitored nodes and nodes in a cluster 2017-03-02 18:59:12 +04:00
monitor_test.go tm-monitor 0.1.0 2017-03-01 23:01:52 +04:00
network.go differentiate between monitored nodes and nodes in a cluster 2017-03-02 18:59:12 +04:00
node.go set network's `NumValidators` and node's `IsValidator` 2017-03-02 12:53:05 +04:00
node_test.go tm-monitor 0.1.0 2017-03-01 23:01:52 +04:00
rpc.go tm-monitor 0.1.0 2017-03-01 23:01:52 +04:00
ton.go improve ton output 2017-03-06 12:31:53 +04:00

README.md

Tendermint monitor (tm-monitor)

Tendermint monitor watches over one or more Tendermint core applications (nodes), collecting and providing various statistics to the user.

QuickStart using Docker

docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm tendermint/tendermint

docker run -it --rm --link=tm tendermint/tm-monitor tm:46657

QuickStart using binaries

Linux:

curl -L https://s3-us-west-2.amazonaws.com/tendermint/0.8.0/tendermint_linux_amd64.zip && sudo unzip -d /usr/local/bin tendermint_linux_amd64.zip && sudo chmod +x tendermint
tendermint init
tendermint node --app_proxy=dummy

tm-monitor localhost:46657

Max OS:

curl -L https://s3-us-west-2.amazonaws.com/tendermint/0.8.0/tendermint_darwin_amd64.zip && sudo unzip -d /usr/local/bin tendermint_darwin_amd64.zip && sudo chmod +x tendermint
tendermint init
tendermint node --app_proxy=dummy

tm-monitor localhost:46657

Usage

tm-monitor [-v] [-no-ton] [-listen-addr="tcp://0.0.0.0:46670"] [endpoints]

Examples:
        # monitor single instance
        tm-monitor localhost:46657

        # monitor a few instances by providing comma-separated list of RPC endpoints
        tm-monitor host1:46657,host2:46657
Flags:
  -listen-addr string
        HTTP and Websocket server listen address (default "tcp://0.0.0.0:46670")
  -no-ton
        Do not show ton (table of nodes)
  -v    verbose logging

asciicast

RPC UI

Run tm-monitor and visit http://localhost:46670. You should see the list of the available RPC endpoints:

http://localhost:46670/status
http://localhost:46670/status/network
http://localhost:46670/monitor?endpoint=_
http://localhost:46670/status/node?name=_
http://localhost:46670/unmonitor?endpoint=_

The API is available as GET requests with URI encoded parameters, or as JSONRPC POST requests. The JSONRPC methods are also exposed over websocket.

Ideas

  1. Currently we get IPs and dial, but should reverse so the nodes dial the netmon, both for node privacy and easier reconfig (validators changing ip/port).
  2. Uptime over last day, month, year (Q: how do I get this?)
  3. statsd output (plugin?)
  4. log metrics for charts (Q: what charts?)
  5. show network size (Q: how do I get the number?)
  6. metrics RPC (Q: do we need this?)