Bootstrap FreeKB - Introscope - Monitor a Tomcat Application Server (agent.jar)
Introscope - Monitor a Tomcat Application Server (agent.jar)

Updated:   |  Introscope articles

Add the following options to each Tomcat JVMs setenv.sh file. The setenv.sh file will be locate at tomcat_home/profiles/jvm_name/bin/setenv.sh. Replace "introscope_home" with the path where Introscope is installed, such as /opt/introscope/.

INTROSCOPE_AGENT="-javaagent:introscope_home/wily/Introscope/Agent.jar"
INTROSCOPE_PROFILE="-Dcom.wily.introscope.agentProfile=introscope_home/wily/Introscope/core/config/IntroscopeAgent.profile"
INTROSCOPE_AGENTNAME="-Dcom.wily.introscope.agent.agentName=<jvm name>"

 

Ensure the variables are listed in the JVM_OPTS variable.

JVM_OPTS="$INTROSCOPE_AGENT $INTROSCOPE_PROFILE $INTROSCOPE_AGENTNAME"

 

Ensure the other variables are properly formatted.  In this example, another variable is missing the closing double-quote, this could cause the JVM to be missing from Introscope.

MQ_CLIENT_CIPHER="-Dcom.ibm.mq.cfg.useIBMCipherMappings=false

 

The introscope_home/wily/Introscope/core/config/IntroscopeAgent.profile file should have the following, at minimum. Replace "your_hostname" and "your_port" with the hostname and port of your Introscope server.

introscope.agent.customProcessName=Tomcat
introscope.changeDetector.rootDir=introscope_home/wily/Introscope<version>/wily/change_detector
introscope.agent.enterprisemanager.transport.tcp.host.DEFAULT=your_hostname
introscope.agent.enterprisemanager.transport.tcp.port.DEFAULT=your_port

 

Restart the Tomcat appliation server for any changes to take effect.

 


IntroscopeAgent.log

If communication is successful between the Introscope collector and your Tomcat application server, IntroscopeAgent.log on your Tomcat server should have something like this.

mm/dd/yy hh:mm:ss [INFO] [IntroscopeAgent.Isengard] Initiating connection attempts to the Introscope Enterprise Manager.

mm/dd/yy hh:mm:ss [INFO] [IntroscopeAgent.IsengardServerConnectionManager] Connected controllable Agent to the Introscope Enterprise Manager at collector1.example.com:5001,com.wily.isengard.postofficehub.link.net.DefaultSocketFactory. Host = "SERVER01", Process = "Platform", Agent Name = "myJVM", Active = "true".

mm/dd/yy hh:mm:ss [INFO] [IntroscopeAgent.ConnectionThread] Connected to collector1.example.com:5001,com.wily.isengard.postofficehub.link.net.DefaultSocketFactory in allowed mode.

 

Likewise, the log should identify when the agent startup has completed.

mm/dd/yy hh:mm:ss [INFO] [IntroscopeAgent.Agent] Introscope Agent startup complete.

 

If communication is unsuccessful, IntroscopeAgent.log should have something like this. This is expected when the Tomcat application server is stopped.

mm/dd/yy hh:mm:ss [WARN] [IntroscopeAgent.IsengardServerConnectionManager] Introscope Enterprise Manager collector1.example.com:5001,com.wily.isengard.postofficehub.link.net.DefaultSocketFactory requested disconnect

mm/dd/yy hh:mm:ss [WARN] [IntroscopeAgent.IsengardServerConnectionManager] Lost contact with the Introscope Enterprise Manager at collector1.example.com:5001.

 


IntroscopeEnterpriseManager.log on the Collector

If communication is successful between the Introscope collector and your Tomcat application server, IntroscopeEnterpriseManager.log on the collector should have something like this.

mm/dd/yy hh:mm:ss [INFO] [PO:WatchedAgentPO Mailman 1] [Manager.Agent] Connected to Agent "SuperDomain/Platform|agent1.example.com|Platform|myJVM" at "Node=Agent_31, Address=agent1.example.com/10.15.231.81:50858, Type=socket" using Agent protocol revision 1.0

 

If communication is unsuccessful, IntroscopeEnterpriseManager.log should have something like this. This is expected when the Tomcat application server is stopped.

mm/dd/yy hh:mm:ss [INFO] [Manager] Lost connection at: Node=Agent_31, Address=agent1.example.com/10.15.231.81:50858, Type=socket

mm/dd/yy hh:mm:ss [INFO] [Manager.Agent] Disconnected from Agent "SuperDomain/Platform|agent1.example.com|Platform|myJVM"

 


IntroscopeEnterpriseManager.log on the MoM

If you are using a Manager of Managers (MoM), and communication is successful between the Introscope collector and your Tomcat application server, IntroscopeEnterpriseManager.log on the MoM should have something like this.

mm/dd/yy hh:mm:ss [VERBOSE] [Manager.PostOfficeHub] Connected To: Node=Agent_1104, Address=agent1.example.com/10.15.231.81:45656, Type=socket

mm/dd/yy hh:mm:ss [VERBOSE] [Manager.LoadBalancer] Assign SuperDomain/Platform|agent1.example.com|Platform|myJVM to collector1.example.com@5001 (22337 metrics)

 

If communication is unsuccessful, IntroscopeEnterpriseManager.log should have something like this. This is expected when the Tomcat application server is stopped.

mm/dd/yy hh:mm:ss  [VERBOSE] [Manager.LoadBalancer] No eligible collector for: SuperDomain/Platform|agent1.example.com|Platform|myJVM

mm/dd/yy hh:mm:ss  [VERBOSE] [Manager.EventHandler] Error reading incoming bytes in Server Hub Receive 1115 event handler for Socket Transport connected with Socket[addr=agent1.example.com/10.15.231.81,port=45656,localport=5001] because java.io.IOException: An existing connection was forcibly closed by the remote host

mm/dd/yy hh:mm:ss  [VERBOSE] [Manager.PostOfficeHub] Disconnected From: Node=Agent_1104, Address=agent1.example.com/10.15.231.81:45656, Type=socket

 


Unmount

Note that the unmounting an agent does not cause "Lost connection" and "Disconnected from Agent". Instead, IntroscopeEnterpriseManager.log on the collector should have the following for an unmount.

mm/dd/yy hh:mm:ss [INFO] [PO:main Mailman 5] [Manager.Agent] Unmount completed of Agent "server2|Platform|JVM2"

 


Metrics

Introscope will now attempt to gather metrics from your Tomcat application servers and then send the metrics to the Introscope Enterprise Manager.




Did you find this article helpful?

If so, consider buying me a coffee over at Buy Me A Coffee



Comments


Add a Comment


Please enter bd1ae6 in the box below so that we can be sure you are a human.