How to configure hp diagnostics java agent

1.Copy the current java agent setup(JavaAgentSetup_linux_xxx.xx.bin) to the server: /tmp directory

2. execute this file:  ./JavaAgentSetup_linux_x_xxxx.bin -console

3. hit enter 30-33 times and chose option 1 to accept license

4. Installation Directory Name: [/opt/MercuryDiagnostics/JavaAgent] /opt/HP/JavaAgent  and press 1 for next untill installation complete.

5.  cd to /opt/hpdiagnostics/JavaAgent/DiagnosticsAgent/bin


6. execute ./setupModule.sh

*************************************************************************
PLEASE INPUT (X:Yes, O:No)-> Diagnostics Profiler Only [X]:O
PLEASE INPUT (X:Yes, O:No)-> Diagnostics Java Agent working with an HP Diagnostics Server [O]:X
PLEASE INPUT (X:Yes, O:No)-> TransactionVision Java Agent working with an HP TransactionVision Server [O]:O
*************************************************************************
HP Diagnostics/TransactionVision Agent for Java
Focus: Identify the Java Agent
Progress: 2 of 3
*************************************************************************
PLEASE INPUT-> Java Agent Name [inoms_corp_com]:
PLEASE INPUT-> Java Agent Group [Default]:J2EE_Dev
*************************************************************************
HP Diagnostics/TransactionVision Agent for Java
Focus: Configure the Diagnostics Java Agent
Progress: 3 of 3
*************************************************************************
PLEASE INPUT-> Diagnostics Server Name [localhost]:enter HP diag Server Name

PLEASE INPUT-> Diagnostics Server Port [2006]:keep it default
PLEASE INPUT (X:Yes, O:No)-> Tune Diagnostics Java Agent for use in an SAP NetWeaver Application Server [O]:O

PLEASE INPUT (X:Yes, O:No)-> Disable direct access to Java Agent stats/metrics (used for SaaS) [O]:O

PLEASE INPUT->
CONFIRM-> Would you like to save your changes now? Enter Y or N:  [Y]:Y

INFORMATION-> [Save]: Saving Dialog Select the Java Agent Configuration Options
INFORMATION-> [Save]: Saving Dialog Identify the Java Agent
INFORMATION-> [Save]: Saving Dialog Configure the Diagnostics Java Agent
INFORMATION-> [Save]: Saving Dialog Configure the TransactionVision Java Agent (page 1 of 2)
INFORMATION-> [Save]: Saving Dialog Configure the TransactionVision Java Agent (page 2 of 2)
INFORMATION-> [Save]: Saving Dialog default
INFORMATION-> [Save]: Saving Dialog Configure the TransactionVision Java Agent Event Transport Options for WebSphere MQ
INFORMATION-> [Save]: Saving Dialog Configure the TransactionVision Java Agent Event Transport Options for SonicMQ
INFORMATION-> [Save]: Saving Dialog Configure the TransactionVision Java Agent Event Transport Options for Tibco EMS
INFORMATION-> [Save]: Saving Dialog Configure the TransactionVision Java Agent Event Transport Options for WebLogic JMS
INFORMATION-> [Save]: Saving Diagnostics Agent property files
INFORMATION-> [JASM Post Setup Summary]:
Success (HP diag Server Name:2006) Diagnostics Server registrar connectivity validation
INFORMATION-> [Currently Instrumented VMs]:
PLEASE INPUT-> Option? ('Command', H: Help, or 0: Exit) [0]:O


Usage
jreinstrumenter -a DIR                 look for JVMs below directory 'DIR'
jreinstrumenter -l                     display list of known JVMs
jreinstrumenter -i JVM_DIR             instrument the JVM in 'JVM_DIR'
jreinstrumenter -b JVM_DIR             instrument the JVM in 'JVM_DIR' and put the ClassLoader in classes/boot
INFORMATION-> [Currently Instrumented VMs]:
PLEASE INPUT-> Option? ('Command', H: Help, or 0: Exit) [0]:0      [zero]

7. execute  ./jreinstrumenter.sh -b location of application specific JDK

8. Enabling the probe agent for Java

Steps to enable the probe agent for JBoss (run.conf modification (single node))

JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/HP/JavaAgent/DiagnosticsAgent/lib/probeagent.jar -Dprobe.log.dir=/opt/logs/hpdiag -Dprobe.id=probe_name -Dprobe.group=probe_group -Dwebserver.jetty.port=4500x"

Steps to enable the probe agent for JBoss (run.conf modification (multiple nodes)), add the following variables:

if [ $2 = "jboss-config-name" ]; then probeport=4500X; fi
if [ $2 = "jboss-config-name" ]; then probeid=probe_name; fi

modify/add additional java_opts line:

JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/hpdiagnostics/DiagnosticsAgent/lib/probeagent.jar -Dprobe.id=$probeid -Dprobe.log.dir=/opt/logs/hpdiag -D
probe.group=$probe_group -Dwebserver.jetty.port=$probeport -Dprobe.points.name.file=/opt/bin/auto_detect.points -agentpath:/opt/hpdiagnostics/Dia
gnosticsAgent/lib/x86-linux/libjvmti.so"

Note: In production we can skip use of -agentpath:/opt/hpdiagnostics/../../libjvmti.so (NON-PRODUCTION ONLY)

Steps to enable the probe agent for WebLogic Managed Server (single and mutliple nodes)

Add the following in the startWeblogic.sh somewhere after the line:

# START WEBLOGIC

############ This code is added for HP Diagnostics  ###################

if [ $SERVER_NAME == "server-456-inoms" ]
then
JAVAAGENT="-javaagent:/opt/HP/JavaAgent/DiagnosticsAgent/lib/probeagent.jar -Dprobe.id=inoms_1 -Dprobe.log.dir=/opt/hplogs -Dprobe.group=J2EE_QA -Dwebserver.jetty.port=45000"
fi

Steps to enable the probe agent for Tomcat Application Server

Add the following to JAVA_OPTS:

     JAVA_OPTS="$JAVA_OPTS -javaagent:/opt/hpdiagnostics/JavaAgent/DiagnosticsAgent/lib/probeagent.jar -Dprobe.id=Prob_ID_NAME -Dprobe.log.dir=/opt/logs/hpdiag -Dprobe.group=J2EE_QA -Dwebserver.jetty.port=45000 -Dprobe.points.name.file=/opt/tomcat/bin/auto_detect.points"

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.