Tomcat Management and Monitoring Tool Probe

About Probe

Probe is a tool that provides Tomcat management and monitoring features. It provides various features such as application status, data sources, deployment, system, and connections.

This was the first time I learned that this kind of tool existed, and I became curious enough to look into it further.

Probe Resources

Perhaps because Probe is not used often, it was hard to find information even by searching the internet. The site I barely found was GitHub.

Trying Probe Installation

Using the information here, I was able to test installing Probe. The installation method is as follows.

  1. Download the Probe source files with the git clone command as shown below.
git clone https://github.com/psi-probe/psi-probe.git

When the command is executed, it looks like this.

kimkc@kimkcui-MacBookPro probe % git clone https://github.com/psi-probe/psi-probe.git
Cloning into 'psi-probe'...
remote: Enumerating objects: 54626, done.
remote: Counting objects: 100% (1030/1030), done.
remote: Compressing objects: 100% (499/499), done.
remote: Total 54626 (delta 564), reused 927 (delta 498), pack-reused 53596
Receiving objects: 100% (54626/54626), 33.42 MiB | 10.71 MiB/s, done.
Resolving deltas: 100% (38049/38049), done.
kimkc@kimkcui-MacBookPro probe %
  1. Run the Maven build for the Probe project as follows.
mvn package

When the build runs, the output appears as follows.

kimkc@kimkcui-MacBookPro psi-probe % mvn package
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO] 
[INFO] psi-probe                                                          [pom]
[INFO] psi-probe-core                                                     [jar]
[INFO] psi-probe-rest                                                     [jar]
[INFO] psi-probe-tomcat7                                                  [jar]
[INFO] psi-probe-tomcat85                                                 [jar]
[INFO] psi-probe-tomcat9                                                  [jar]
[INFO] psi-probe-web                                                      [war]
[INFO] 

(omitted)

[INFO] Reactor Summary for psi-probe 3.5.5-SNAPSHOT:
[INFO] 
[INFO] psi-probe .......................................... SUCCESS [  1.573 s]
[INFO] psi-probe-core ..................................... SUCCESS [ 20.977 s]
[INFO] psi-probe-rest ..................................... SUCCESS [  1.375 s]
[INFO] psi-probe-tomcat7 .................................. SUCCESS [  4.093 s]
[INFO] psi-probe-tomcat85 ................................. SUCCESS [  3.823 s]
[INFO] psi-probe-tomcat9 .................................. SUCCESS [  3.801 s]
[INFO] psi-probe-web ...................................... SUCCESS [  4.559 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  40.441 s
[INFO] Finished at: 2021-06-30T16:11:58+09:00
[INFO] ------------------------------------------------------------------------
kimkc@kimkcui-MacBookPro psi-probe %

If all projects are displayed as SUCCESS as shown above, the build completed properly.

  1. Download Tomcat from the Tomcat site, then extract the file to an appropriate directory.

Here, I downloaded the tar.gz file and extracted it with the following command.

tar -xvf apache-tomcat-8.5.68.tar.gz
kimkc@kimkcui-MacBookPro probe % tar -xvf apache-tomcat-8.5.68.tar.gz
x apache-tomcat-8.5.68/conf/
x apache-tomcat-8.5.68/conf/catalina.policy
x apache-tomcat-8.5.68/conf/catalina.properties
x apache-tomcat-8.5.68/conf/context.xml
x apache-tomcat-8.5.68/conf/jaspic-providers.xml

After extraction is complete, check the file contents.

kimkc@kimkcui-MacBookPro apache-tomcat-8.5.68 % cd /Users/kimkc/dev/probe/apache-tomcat-8.5.68 
kimkc@kimkcui-MacBookPro apache-tomcat-8.5.68 % ls
BUILDING.txt    LICENSE         README.md       RUNNING.txt     conf            logs            webapps
CONTRIBUTING.md NOTICE          RELEASE-NOTES   bin             lib             temp            work
kimkc@kimkcui-MacBookPro apache-tomcat-8.5.68 %
  1. Now place the WAR file built with Probe into {tomcat directory}/webapps.

The Probe WAR file is located in the following directory.

{probe source code directory}/psi-probe-web/target/probe.war

Put the WAR file into Tomcat’s webapps.

kimkc@kimkcui-MacBookPro psi-probe % cp ./psi-probe-web/target/probe.war ../apache-tomcat-8.5.68/webapps
  1. Finally, add role information to the Tomcat user information file, apache-tomcat-x.x.x/conf/tomcat-users.xml, as shown below.
(omitted)
<tomcat-users xmlns="http://tomcat.apache.org/xml"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://tomcat.apache.org/xml tomcat-users.xsd"
              version="1.0">
(omitted)

  <role rolename="manager-gui"/>
  <role rolename="manager-script"/>
  <role rolename="manager-status"/>
  <user username="devkuma" password="1234" roles="manager-gui,manager-script,manager-status"/>

</tomcat-users>

This Tomcat Probe account has the username devkuma and the password 1234.

If this information is not added, you will not be able to access the Probe web interface.

  1. Now restart Tomcat.
kimkc@kimkcui-MacBookPro bin % ./startup.sh 
Using CATALINA_BASE:   /Users/kimkc/dev/probe/apache-tomcat-8.5.68
Using CATALINA_HOME:   /Users/kimkc/dev/probe/apache-tomcat-8.5.68
Using CATALINA_TMPDIR: /Users/kimkc/dev/probe/apache-tomcat-8.5.68/temp
Using JRE_HOME:        /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home
Using CLASSPATH:       /Users/kimkc/dev/probe/apache-tomcat-8.5.68/bin/bootstrap.jar:/Users/kimkc/dev/probe/apache-tomcat-8.5.68/bin/tomcat-juli.jar
Using CATALINA_OPTS:
Tomcat started.
kimkc@kimkcui-MacBookPro bin %

If the screen opens when you access the following link, the installation was successful.

http://localhost:8080/probe/

Deploying Web Application (.war) Files Through Probe

  1. Move to the following location.
http://10.10.100.158:8080/probe/adm/deploy.htm
  1. Select the web service WAR file in Select a .war file to upload *.

  2. Enter the Context name (ex. /dummy).

  3. Click the Deploy button.

  4. Check whether the service runs as entered above. If you entered /dummy as the Context name, the web address becomes the following.

http://10.10.100.158:8080/dummy

Note: When deploying through Probe, Tomcat itself is not restarted; only the web application WAR file is replaced and the web service is brought back up. Because the service may pause briefly during this process, it cannot be considered zero-downtime deployment. In any case, using the deployment feature for simple testing is fine, but it should not be used to deploy a real service.