The healthMonitor example is a JMX client application that connects
to the GemFire JMX Agent via an RMIConnector to monitor the health of a
GemFire Enterprise distributed system. The example is located in the GemFire
installation under examples/dist/healthMonitor.
Before running this application, you need to create a terminal session and configure its environment according to the instructions provided under the GemFire installation in examples/EnvSetup.html. Be sure to include the JMX-related environment changes that are specific to this example.
Change to the examples/dist/healthMonitor directory
in the terminal session.
Next, start the GemFire JMX Agent by entering the following command:
agent start
Now run the
application. The healthMonitor usage is:
java healthMonitor.HealthMonitor <host> <port> [<gemfire.properties>]
The host is the name of the system where you started the agent. The port is the agent's RMIConnectorServer port (default 1099). This sample startup line starts the application for an agent launched on a host named "lucy" on the default RMIConnectorServer port:
java healthMonitor.HealthMonitor lucy 1099
You may optionally specify a gemfire.properties file as an argument to
HealthMonitor. It will also automatically pick up any gemfire.properties
file that you place in the examples/dist/healthMonitor directory. The
application will then use the values in the properties file to determine
details on the system it will connect to:
java healthMonitor.HealthMonitor lucy 1099 gemfire.properties
Once started, the application will attach to the GemFire JMX Agent using the RMIConnector as defined by JSR 160. By configuring the Agent and manipulating the MBeans that it exposes, the application will monitor the health of a GemFire distributed system and its members.
To stop the agent and locator, follow these steps:
CTRL-C to display the command prompt.agent stop to shut down the JMX agent.exit to close the terminal session.