Java – How to monitor Java memory Usage or Heap Size via Hyperic Monitoring

hypericjavamonitoring

I was trying to configure the JVM memory usage, Heap Size and Logs monitoring via Hyperic Tool. But the documentation is not much clear how to do that. Is anybody can guide me please.

Best Answer

  1. Add the following JVM args to your application startup to enable JMX jvm monitoring:

    -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=(choose a port number) -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false

  2. Go into hyperic, select you server.

  3. Go to Tools->New Server.
  4. Select "Sun JVM 1.5" (Even if your running 1.6).
  5. Enter a name
  6. Enter the path to your jdk in install path.
  7. Go to "Configure properties".
  8. For the jmx url enter: service:jmx:rmi:///jndi/rmi://localhost:(port number from above)/jmxrmi