You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

93 lines
2.2 KiB

6 years ago
  1. # tm-monitor
  2. Tendermint blockchain monitoring tool; watches over one or more nodes,
  3. collecting and providing various statistics to the user:
  4. - https://github.com/tendermint/tendermint/tree/master/tools/tm-monitor
  5. ## Quick Start
  6. ### Docker
  7. Assuming your application is running in another container with the name
  8. `app`:
  9. ```
  10. docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
  11. docker run -it --rm -v "/tmp:/tendermint" -p "26657:26657" --name=tm --link=app tendermint/tendermint node --proxy_app=tcp://app:26658
  12. docker run -it --rm -p "26670:26670" --link=tm tendermint/monitor tm:26657
  13. ```
  14. If you don't have an application yet, but still want to try monitor out,
  15. use `kvstore`:
  16. ```
  17. docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
  18. docker run -it --rm -v "/tmp:/tendermint" -p "26657:26657" --name=tm tendermint/tendermint node --proxy_app=kvstore
  19. ```
  20. ```
  21. docker run -it --rm -p "26670:26670" --link=tm tendermint/monitor tm:26657
  22. ```
  23. ### Using Binaries
  24. [Install Tendermint](https://github.com/tendermint/tendermint#install)
  25. then run:
  26. ```
  27. tendermint init
  28. tendermint node --proxy_app=kvstore
  29. ```
  30. ```
  31. tm-monitor localhost:26657
  32. ```
  33. with the last command being in a seperate window.
  34. ## Usage
  35. ```
  36. tm-monitor [-v] [-no-ton] [-listen-addr="tcp://0.0.0.0:26670"] [endpoints]
  37. Examples:
  38. # monitor single instance
  39. tm-monitor localhost:26657
  40. # monitor a few instances by providing comma-separated list of RPC endpoints
  41. tm-monitor host1:26657,host2:26657
  42. Flags:
  43. -listen-addr string
  44. HTTP and Websocket server listen address (default "tcp://0.0.0.0:26670")
  45. -no-ton
  46. Do not show ton (table of nodes)
  47. -v verbose logging
  48. ```
  49. ### RPC UI
  50. Run `tm-monitor` and visit http://localhost:26670 You should see the
  51. list of the available RPC endpoints:
  52. ```
  53. http://localhost:26670/status
  54. http://localhost:26670/status/network
  55. http://localhost:26670/monitor?endpoint=_
  56. http://localhost:26670/status/node?name=_
  57. http://localhost:26670/unmonitor?endpoint=_
  58. ```
  59. The API is available as GET requests with URI encoded parameters, or as
  60. JSONRPC POST requests. The JSONRPC methods are also exposed over
  61. websocket.
  62. ## Development
  63. ```
  64. make get_tools
  65. make get_vendor_deps
  66. make test
  67. ```