GitHub

javamon

[ Download | API javadoc | Discussions ]
The javamon is an open-source lightweight Java monitoring agent. Its purpose is to monitor a JVM process remotely to detect anomalies, like high memory usage or unexpected restarts. It can be used as a Java library or a wrapper (launcher). In the latter case there is no need to modify or recompile the target Java application source code. Javamon exposes an HTTP endpoint compatible with Prometheus, an open-source monitoring system.

Javamon is compatible with Java 1.4 and later. It pretends to be as lightweight and efficient as possible while relying on standard Java features only. Javamon is implemented as a single class, without external dependencies. The jar file size is less than 3.5Kb.

  JVM processjavamonhttp://IP:port/metricsPrometheus

 

The following metrics are exposed to Prometheus:

 Metric name Metric type  Units Description
 heap_size_bytes  gauge bytes Current JVM heap size
 heap_free_bytes gauge bytes Bytes currently available in the Java heap
 uptime_sec counter seconds  Seconds since last javamon restart (normally this value matches the JVM uptime) 

Feel free to modify the source code to include additional metrics.

Please, refer to the project repository for examples and documentation.

© 2025
All rights reserved