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.

87 lines
2.6 KiB

8 years ago
8 years ago
  1. # Tendermint monitor (tm-monitor)
  2. Tendermint monitor watches over one or more [Tendermint
  3. core](https://github.com/tendermint/tendermint) applications (nodes),
  4. collecting and providing various statistics to the user.
  5. * [QuickStart using Docker](#quickstart-using-docker)
  6. * [QuickStart using binaries](#quickstart-using-binaries)
  7. * [Usage](#usage)
  8. * [RPC UI](#rpc-ui)
  9. ## QuickStart using Docker
  10. ```
  11. docker run -it --rm -v "/tmp:/tendermint" tendermint/tendermint init
  12. docker run -it --rm -v "/tmp:/tendermint" -p "46657:46657" --name=tm tendermint/tendermint
  13. docker run -it --rm --link=tm tendermint/monitor tm:46657
  14. ```
  15. ## QuickStart using binaries
  16. Linux:
  17. ```
  18. 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
  19. tendermint init
  20. tendermint node --app_proxy=dummy
  21. tm-monitor localhost:46657
  22. ```
  23. Max OS:
  24. ```
  25. 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
  26. tendermint init
  27. tendermint node --app_proxy=dummy
  28. tm-monitor localhost:46657
  29. ```
  30. ## Usage
  31. ```
  32. tm-monitor [-v] [-no-ton] [-listen-addr="tcp://0.0.0.0:46670"] [endpoints]
  33. Examples:
  34. # monitor single instance
  35. tm-monitor localhost:46657
  36. # monitor a few instances by providing comma-separated list of RPC endpoints
  37. tm-monitor host1:46657,host2:46657
  38. Flags:
  39. -listen-addr string
  40. HTTP and Websocket server listen address (default "tcp://0.0.0.0:46670")
  41. -no-ton
  42. Do not show ton (table of nodes)
  43. -v verbose logging
  44. ```
  45. [![asciicast](https://asciinema.org/a/105974.png)](https://asciinema.org/a/105974)
  46. ### RPC UI
  47. Run `tm-monitor` and visit [http://localhost:46670](http://localhost:46670).
  48. You should see the list of the available RPC endpoints:
  49. ```
  50. http://localhost:46670/status
  51. http://localhost:46670/status/network
  52. http://localhost:46670/monitor?endpoint=_
  53. http://localhost:46670/status/node?name=_
  54. http://localhost:46670/unmonitor?endpoint=_
  55. ```
  56. The API is available as GET requests with URI encoded parameters, or as JSONRPC
  57. POST requests. The JSONRPC methods are also exposed over websocket.
  58. ### Ideas
  59. 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).
  60. 2. Uptime over last day, month, year (Q: how do I get this?)
  61. 3. `statsd` output (plugin?)
  62. 4. log metrics for charts (Q: what charts?)
  63. 5. show network size (Q: how do I get the number?)
  64. 6. metrics RPC (Q: do we need this?)