Anton Kaliaev 9181822f65 | 7 years ago | |
---|---|---|
.. | ||
eventmeter | 7 years ago | |
mock | 7 years ago | |
monitor | 7 years ago | |
Dockerfile | 7 years ago | |
Dockerfile.dev | 8 years ago | |
LICENSE | 8 years ago | |
Makefile | 8 years ago | |
README.md | 8 years ago | |
glide.lock | 7 years ago | |
glide.yaml | 7 years ago | |
main.go | 8 years ago | |
rpc.go | 8 years ago | |
ton.go | 8 years ago |
Tendermint monitor watches over one or more Tendermint core applications (nodes), collecting and providing various statistics to the user.
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/monitor tm:46657
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
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
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.
# agent collecting metrics from localhost (default)
tm-monitor agent --master="192.168.1.17:8888"
# agent collecting metrics from another TM node (useful for testing, development)
tm-monitor agent --master="192.168.1.17:8888" --node="192.168.1.18:46657"
# master accepting stats from agents
tm-monitor master [--ton] OR [--ui] (`--ui` mode by default)
# display table of nodes in the terminal (useful for testing, development, playing with TM)
# --nodes="localhost:46657" by default
tm-monitor
# display table of nodes in the terminal (useful for testing, development, playing with TM)
tm-monitor --nodes="192.168.1.18:46657,192.168.1.19:46657"
-auto-discovery
option and try to connect to every node.Feel free to vote on the ideas or add your own by saying hello on Slack or by opening an issue.