Skip to content

Latest commit

 

History

History
71 lines (47 loc) · 1.7 KB

README.md

File metadata and controls

71 lines (47 loc) · 1.7 KB

Monitor Tutorial

Swim application tutorial to monitor a cluster of machines.

Getting Started

Install JDK 11+

  • Ensure that your JAVA_HOME environment variable points to the Java installation.
  • Ensure that your PATH includes $JAVA_HOME.

Running the Tutorial

Running the Server

$ ./gradlew run

Running a Client

$ ./gradlew -Dhost=<warp-address-of-server> runClient

Example:

$ ./gradlew -Dhost=warp://localhost:9001 runClient

Streaming APIs

Introspection APIs

Stream High level stats

swim-cli sync -h warp://localhost:9001 -n swim:meta:mesh -l pulse

Application APIs

Streaming APIs for top level Monitor

swim-cli sync -h warp://localhost:9001 -n /monitor -l machines
swim-cli sync -h warp://localhost:9001 -n /monitor -l clusters

Streaming APIs for a given Machine

swim-cli sync -h warp://localhost:9001 -n /machine/my-machine -l status
swim-cli sync -h warp://localhost:9001 -n /machine/my-machine -l statusHistory
swim-cli sync -h warp://localhost:9001 -n /machine/my-machine -l systemInfo
swim-cli sync -h warp://localhost:9001 -n /machine/my-machine -l usage
swim-cli sync -h warp://localhost:9001 -n /machine/my-machine -l processes

Streaming APIs for a Cluster

swim-cli sync -h warp://localhost:9001 -n /cluster/abc -l machines
swim-cli sync -h warp://localhost:9001 -n /cluster/abc -l status
swim-cli sync -h warp://localhost:9001 -n /cluster/abc -l statusHistory

Running the UI

Now, you can view the UI by appending /ui to the host address using the HTTP or HTTPS protocol, such as http://localhost:9001/ui.