In this simple guide, we will show you how to Install JENNIFER agent and monitor you java application running on docker container.
In order to follow up with this tutorial, you will need JENNIFER agent installation package, and JENNIFER server up and running. If you do not have the installation package you can obtain a 2 weeks trial license from our homepage
In this tutorial, we will be using tomcat as our application server. Before we get the configuration. Make sure to download the agent package and add it to your project root where you have your Docker file.
After downloading the agent package, move it to your working directory where you have your Dockerfile. Also create 2 files, jennifer.conf and setenv.sh in the same directory. Your working directory should look like the following.
??? java_agent_install
??? Dockerfile
??? jennifer-agent-java-x.x.x.x.zip
??? jennifer.conf
??? setenv.sh
3.1 Agent Configurations
We will start by modifying the agent configuration file. Open the jennifer.conf file and modify the server_address value to point to your JENNIFER Data server IP. Also, modify the server_port and domain_id values if you are not using the default values. The agent configuration file should look like this
server_address = 192.168.9.37
server_port = 5000
# default log_dir "{agent_home}/logs"
# log_dir = {agent_home}/logs
# log_file =
# log_level : 1(info), 2(debug), 3(trace)
log_level = 1
log_encoding = UTF-8
log_rotation = true
# log_max_age : Working when log_rotation is activated. Valid ragne is (1-365)
# log_max_age = 0
# domain_id : Valid range is (1-32767)
domain_id = 1000
3.2 Tomcat configurations
The next step is to modify setenv.sh file. Open this file with your editor and set CATALINA_OPTS value.
# JENNIFER Java Agent
AGENT_HOME=/opt/agent.java
export CATALINA_OPTS="$CATALINA_OPTS -javaagent:$AGENT_HOME/jennifer.jar -Djennifer.config=$AGENT_HOME/conf/jennifer.conf"
3.3 Docker file.
The last thing to do is to work on our docker file. The steps needed to install the agent are :
Our Dockerfile looks like the following
FROM alpine AS builder
LABEL maintainer="Khalid Saeed khalid@jennifersoft.com"
ENV AGENT_VERSION=5.3.2.7
RUN apk --no-cache add unzip
COPY jennifer-agent-java-${AGENT_VERSION}.zip /
RUN unzip -oq jennifer-agent-java-${AGENT_VERSION}.zip -d /tmp
FROM tomcat:8.5-jre8-alpine
RUN apk update && apk upgrade
COPY --from=builder /tmp/agent.java /opt/agent.java
COPY jennifer.conf /opt/agent.java/conf/jennifer.conf
COPY setenv.sh ${CATALINA_HOME}/bin
Make sure to replace AGENT_VERSION with the correct agent version you downloaded
In this example, we are using multi-stage builder. However, you can create the Dockerfile in any way you see feet.
After creating the docker file you can build and run the container
docker build -t jennifer-java .
docker run -d --name test jennifer-java
If you followed the steps correctly, you should see the agent appearing on your JENNIFER dashboard
You can find an example code at this Github repo
In a previous article, JENNIFER Events and Alerts, we gave an introduction to JENNIFER EVENTS system. In this article, we will see how the EVENT system can be used in action. We will see how to analyz...
JENNIFER Events is a flexible notification system that allows the operation teams to receive notification about incidents that take place in a system. JENNIFER Event Rules allows you to configure Even...
Dynamic method profile is a powerful feature in JENNIFER that allows you to increase/decrease the profiling level of a transaction without restarting the application server. First of all, what is a...
What is Deployment Indicator When a new version of the code is deployed in production, JENNIFER can automatically detect this change and display the changed resource in the deployment. A vertical...
Mule is a lightweight Java-based enterprise service bus (ESB) and integration framework developed by MuleSoft. Mule ESB allows developers to connect applications together easily and quickly, enabling...