This is a library and a web application that showcases exposing resources such as CPU, heap memory usage, CDI beans, etc. as a RESTful resource. It is inspired by Spring Boot Actuator.
You can either deploy the showcase web application into TomEE 7.0.1 server, or you can run it directly using the TomEE Maven plugin
-
Download and extract Apache TomEE 7.0.1 Plume
-
Build this project
-
Configure the JMX server by running this command in the console.
# For Windows
set CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=11223 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
# For Linux
export CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=11223 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
-
Start TomEE application server in the same console
-
Deploy the war from the
javaee-actuator-showcase/target
directory -
The actuator endpoints should be available at
https://localhost:8080/actuator/actuator
-
Build this project
-
Change to the javaee-actuator-showcase directory
-
Configure the JMX server by running this command in the console.
# For Windows
set CATALINA_OPTS=-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=11223 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false
# For Linux
export CATALINA_OPTS="-Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=11223 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false"
-
Execute
mvn tomee:run
-
The actuator endpoints should be available at
https://localhost:8080/actuator/actuator
Endpoint | Description |
---|---|
|
Provides useful metrics such as CPU, Heap Memory usage, etc. |
|
Lists the CDI beans loaded by the |
|
Shows only beans that belong to the given package. Usefull when you want to filter out beans that come with the server and show only the ones coming with the application. |
|
Dumps the running threads of the application |