Agent Installation for Java
Follow the below mentioned steps for application agent (ND) Installation:
NDHome Directory Creation
- Create Installation directory for NetDiagnostics. For example /opt/cavisson/netdiagnostics
- Copy NetDiagnostics tar file to NDHome directory.
- Un-tar <#release>.<#build>.tar.gz file in same directory.
- After installation, contents in this director is as below:
drwxr-xr-x 3 netstorm_1 netstorm 4096 Mar 25 20:26 gui drwxr-xr-x 3 netstorm_1 netstorm 4096 Mar 25 20:26 thirdparty drwxr-xr-x 2 netstorm_1 netstorm 4096 Mar 25 20:26 schema drwxr-xr-x 5 netstorm_1 netstorm 4096 Mar 25 20:26 samples drwxr-xr-x 2 netstorm_1 netstorm 4096 Mar 25 20:26 logs drwxr-xr-x 2 netstorm_1 netstorm 4096 Mar 25 20:26 lib drwxr-xr-x 2 netstorm_1 netstorm 4096 Mar 25 20:26 etc drwxr-xr-x 2 netstorm_1 netstorm 4096 Mar 25 20:26 config
![]() |
Make Sure NDHome directory should have read and write permission for Application instances.NDHome is the Home directory of ND Agent [path where ND agent is installed] Example /opt/cavisson/netdiagnostics |
Application Agent (ND) Configuration
Follow the below mentioned steps for application agent (ND) configuration:
Config File Creation
Create Config file under NDHome/config directory named ndsettings_<agentId>.conf and it should contain below content.
tier=TierName ndcHost=NDCHost ndcPort=NDCPort
For Example:
For profiling single application on a VM, config file name is ndsettings_1.conf.
Sample content:
tier=MongoDB ndcHost=10.206.249.62 ndcPort=7892
For profiling two applications on a VM, config file name should be as follows.
ndsettings_1.conf (For 1st application) ndsettings_2.conf (For 2nd application)
Content of both file should be same, as VM is hosting single type of application.
Application Argument Setup
Add below argument in application Java options:
-javaagent:<NDHome>/lib/ndmain.jar=time,ndHome=<NDHome>, ndAgentJar=<NDHome>/lib/ndagent-with-dep.jar,agentId=<agentId>
For Example:
For single application running in VM, specify jars and agentId. AgentId in this case is 1.
-javaagent:<ndHome>/lib/main.jar=time,ndHome=<ndHome>, ndAgentJar=<ndHome>/lib/ndagent-with-deb.jar,agentId =1
In case of multiple applications running on VM, which need to be profiled:
For Application – 1
-javaagent:<ndHome>/lib/main.jar=time,ndHome=<ndHome>, ndAgentJar=<ndHome>/lib/ndagent-with-deb.jar,agentId =1
For Application – 2
-javaagent:<ndHome>/lib/main.jar=time,ndHome=<ndHome>, ndAgentJar=<ndHome>/lib/ndagent-with-deb.jar,agentId =2
If application to be profiled is running inside container:
- User needs to mount cavisson home directory (Cav_Home) /opt/cavisson in this container.
- User needs to specify above mentioned arguments in java application options.