Skip to content

Prerequisites

Prerequisites in JIM Agent Installation & Configuration Guide.

8 min read Updated SS MR

Prerequisites#

Before configuring the JIM agent, ensure the following prerequisites are met:

Note: The following prerequisite steps do not apply to the Kubernetes environment.

1. The installation of HEAL must be successful.

2. Ensure the port opening is accessible from the target to HEAL or you cannot apply a prerequisite to telnet from the target to HEAL based on your application data type.

For example: Jaeger, OTLP, etc.

3. Copy the JIM agent files to the target server.

Copy the jim-agent-<version>.tar.gz file to the target server and then extract it using the following commands:

gunzip jim-agent.tar.gz
tar -xvf jim-agent.tar

The folder structure after extracting is as follows:

jim-agent/
├ heal-jim-opentelemetry-javaagent-<version>.jar
└ config/
   └agent-cache.properties

The Opentelemetry jar contains the basic instrumentation code and additional functionalities, such as verbose mode, classifying transactions, and stack traces.

4. Configure the agent-cache.properties file.

Edit the agent-cache.properties file with the required values for each attribute. This file contains multiple sections, each with its own set of attributes:

Note: The values should not contain space or special characters at the start and end of the values.

Agent Cache Properties Configurations#

JIM v1.2.4 and below#

AttributeValue
OpenTelemetry Agent Configuration
otel.traces.exporterThe value is based on your data format.
For example: Jaeger, OTLP, or Zipkin.
The default value is OTLP.
otel.exporter.<data format value>.endpointEnter the host where the OTEL collector is running, and for the port, enter the Jaeger/OTLP receiver port configured in the OTEL config file.
Endpoint values: otel.expoter.otlp.endpoint or otel.expoter.jaeger.endpoint.
* Ensure the required ports are open at the endpoint.
otel.metrics.exporter* None.
* Prometheus (if the metrics required).
Notes:
  • Do not change the sequence of fields in resource attributes.
  • If you wish to add the otel.resource.attributes to the application server, you must comment out this parameter from the agent-cache.properties file.
otel.resource.attributesEnter the identifiers of the service, agent, and instance.
* Ensure each JVM installation's agent ID and instance ID are unique.
otel.instrumentation.ht.enablefalse
(The default value is false, and enable it only when capturing the request and response body of the traces).
HEAL Configuration
slow.transaction.thresholdThe default value is 5000 ms. This attribute identifies if a transaction is slow. This is the threshold against which a JIM agent marks a transaction as slow if its response time exceeds it. The minimum value of this attribute should be 1, and the maximum can be any number.
HEAL Forensics
heal.forensics.file.path<Heal forensic file directory (where thread dump & heap dump file gets created-ensure read & write permission is provided)>
heal.forensics.keystore.file.path<Heal forensic keystore file directory> (copy the keystore file from HEAL primary node - <installation dir>/Appsone_Service/data/cert - ensure read permission is provided).
heal.forensics.keystore.password<Heal forensic keystore password>
heal.forensics.truststore.file.path<Heal forensic trust store file directory> (copy the trust store file from HEAL primary node - <installation dir>/Appsone_Service/data/cert - ensure read permission is provided).
heal.forensics.truststore.password<Heal forensic truststore password>
heal.forensics.http.connection.timeout.millisecondsThe default value is 90000
heal.forensics.http.connection.socket.timeout.millisecondsThe default value is 90000
heal.forensics.command.apihttps://<Haproxy IP:port>/agent-command
heal.forensics.result.apihttps://< Haproxy IP:port>/agent-forensics
heal.forensics.enableTrue (False – to disable the feature)
heal.forensics.scheduler.interval.seconds10
Provide multiple protocol names separated by commas.
heal.forensics.ssl.supported.protocolsTLSv1.2
heal.forensics.command.api.instance.id.header.nameInstance-ID
heal.forensics.command.api.agent.id.header.nameAgent-ID
Provide application server names (for example: Tomcat, JBoss, WebSphere, or WebLogic).
heal.forensics.application.server.name<application server>
heal.forensics.buffer.size.kbs16
JIM Logging
jim.log.file.pathSpecify the path to where the JIM logs will be stored.
The log files, which will be stored on this path, have a file name of instance.uid provided in the agent-cache.properties file. Ensure the "logs" folder is created before starting.
jim.log.patternThis parameter contains the log pattern that will be used in JIM logs.
The date format can be modified according to the need. => DO NOT CHANGE THE PROVIDED VALUE.
jim.log.file.max.sizeThis keeps the maximum size of each log file. If the size of the current log file exceeds this number, a new log file will be rolled out.
If this property is used, Logback will roll out new log files when either the size threshold is reached or a new day has begun.
jim.log.file.total.size.capSpecify the total size cap of JIM logs. If this property is used, Logback will delete the oldest log files to keep the total size from exceeding the specified value.
jim.log.levelMention the log level for the JIM logs. The available levels are ERROR, WARN, INFO, DEBUG, and TRACE. Log levels can be changed at runtime without restarting the application.
The agent-cache file is read every 5 minutes.

For example:

AttributeValue
OpenTelemetry Agent Configuration
otel.traces.exporterjaeger
otel.exporter.jaeger.endpointhttp://192.0.2.59:14250
otel.metrics.exporterNone
otel.resource.attributes=service.nameTomcat_232,agent.uid=JIMAgent_232,instance.uid=Tomcat_comp_Instance
HEAL Configuration
slow.transaction.threshold5000
HEAL Forensics (for non-Kubernetes environment)
heal.forensics.file.path/opt/JIM/jim-agent/Thread
heal.forensics.keystore.file.path/opt/JIM/jim-agent/Thread/appnomic-keystore.jks
heal.forensics.keystore.password<password>
heal.forensics.truststore.file.path/opt/JIM/jim-agent/Thread/appnomic-truststore.jks
heal.forensics.truststore.password<password>
heal.forensics.http.connection.timeout.milliseconds900000
heal.forensics.http.connection.socket.timeout.milliseconds900000
heal.forensics.command.apihttps://192.0.2.60:9998/agent-command
heal.forensics.result.apihttps://192.0.2.60:9998/agent-forensics
heal.forensics.enabletrue
heal.forensics.scheduler.interval.seconds10
Provide multiple protocol names separated by commas.
heal.forensics.ssl.supported.protocolsTLSv1.2
heal.forensics.command.api.instance.id.header.nameInstance-ID
heal.forensics.command.api.agent.id.header.nameAgent-ID
Provide application server names (for example: Tomcat, JBoss, WebSphere, or WebLogic).
heal.forensics.application.server.namewebsphere
heal.forensics.buffer.size.kbs16
JIM Logging
jim.log.file.path/opt/JIM/jim-agent/logs
jim.log.pattern[%-12date{dd-MM-YYYY ss:mm:HH}] [%logger{35}] [%level] - %msg%n
jim.log.file.max.size1MB
jim.log.file.total.size.cap5MB
jim.log.levelINFO, TRACE & DEBUG (provide one of these values)

JIM v1.3.0 & above#

AttributeValue
OpenTelemetry Agent Configuration
otel.traces.exporterThe value is based on your data format.
For example: OTLP. The default value is OTLP.
otel.exporter.otlp.endpointEndpoint values: otel.expoter.otlp.end point
* Ensure the required ports are open at the endpoint.
otel.metrics.exporter* None.
Notes:
  • Do not change the sequence of fields in resource attributes.
  • If you wish to add the otel.resource.attributes to the application server, you must comment out this parameter from the agent-cache.properties file.
otel.resource.attributesEnter the identifiers of the service, agent, and instance.
* Ensure each JVM installation's agent ID and instance ID are unique.
otel.logs.exporternone
otel.java.disabled.resource.providersio.opentelemetry.instrumentation.resources.HostResourceProvider,
io.opentelemetry.instrumentation.resources.OsResourceProvider,
io.opentelemetry.instrumentation.resources.ProcessRuntimeResourceProvider,
io.opentelemetry.instrumentation.resources.AwsResourceProvider
otel.experimental.resource.disabled.keystelemetry.auto.version, telemetry.sdk.language, telemetry.sdk.name, telemetry.sdk.version
HEAL Forensics
heal.forensics.file.path<Heal forensic file directory (where thread dump & heap dump file gets created-ensure read & write permission is provided)>
heal.forensics.keystore.file.path<Heal forensic keystore file directory> (copy the keystore file from HEAL primary node - <installation dir>/Appsone_Service/data/cert – ensure read permission is provided).
heal.forensics.keystore.password<Heal forensic keystore password>
heal.forensics.truststore.file.path<Heal forensic trust store file directory> (copy the trust store file from HEAL primary node - <installation dir>/Appsone_Service/data/cert - ensure read permission is provided).
heal.forensics.truststore.password<Heal forensic truststore password>
heal.forensics.http.connection.timeout.millisecondsThe default value is 90000
heal.forensics.http.connection.socket.timeout.millisecondsThe default value is 90000
heal.forensics.command.apihttps://<Haproxy IP:port>/agent-command
heal.forensics.result.apihttps://< Haproxy IP:port>/agent-forensics
heal.forensics.enableTrue (False – to disable the feature)
heal.forensics.scheduler.interval.seconds10
heal.forensics.ssl.supported.protocolsTLSv1.2 (Provide multiple protocol names separated by commas.)
heal.forensics.command.api.instance.id.header.nameInstance-ID
heal.forensics.command.api.agent.id.header.nameAgent-ID
heal.forensics.application.server.name<application server> [Provide application server names (for example: tomcat, jboss, WebSphere, or WebLogic)].
heal.forensics.buffer.size.kbs16
System Attribute
Dheal.forensics.file.path<Heal forensic file directory (where thread dump & heap dump file gets created-ensure read & write permission is provided)>
Dheal.forensics.keystore.file.path<Heal forensic keystore file directory> (copy the keystore file from HEAL primary node - <installation dir>/Appsone_Service/data/cert - ensure read permission is provided).
Dheal.forensics.keystore.password<Heal forensic keystore password>
Dheal.forensics.truststore.file.path<Heal forensic trust store file directory> (copy the trust store file from HEAL primary node - <installation dir>/Appsone_Service/data/cert - ensure read permission is provided).
Dheal.forensics.truststore.password<Heal forensic truststore password>
Dheal.forensics.http.connection.timeout.millisecondsThe default value is 60000
Dheal.forensics.http.connection.socket.timeout.millisecondsThe default value is 60000
Dheal.forensics.command.apihttps://<Haproxy IP:port>/agent-command
Dheal.forensics.result.apihttps://< Haproxy IP:port>/agent-forensics
Dheal.forensics.enableTrue (False – to disable the feature)
Dheal.forensics.scheduler.interval.seconds10
Dheal.forensics.ssl.supported.protocols
(# Give multiple protocols names separated by commas)
TLSv1.2, TLSv1.3
Dheal.forensics.command.api.instance.id.header.nameInstance-ID
Dheal.forensics.command.api.agent.id.header.nameAgent-ID
Dheal.forensics.application.server.name<application server>
Dheal.forensics.buffer.size.kbs16
Environment Variable
HEAL_FORENSICS_FILE_PATH<Heal forensic file directory (where thread dump & heap dump file gets created-ensure read & write permission is provided)>
HEAL_FORENSICS_KEYSTORE_FILE_PATH<Heal forensic keystore file directory> (copy the keystore file from HEAL primary node - <installation dir>/Appsone_Service/data/cert - ensure read permission is provided).
HEAL_FORENSICS_KEYSTORE_PASSWORD<Heal forensic keystore password>
HEAL_FORENSICS_TRUSTSTORE_FILE_PATH<Heal forensic trust store file directory> (copy the truststore file from HEAL primary node - <installation dir>/Appsone_Service/data/cert - ensure read permission is provided).
HEAL_FORENSICS_TRUSTSTORE_PASSWORD<Heal forensic truststore password>
HEAL_FORENSICS_HTTP_CONNECTION_TIMEOUT_MILLISECONDSThe default value is 60000
HEAL_FORENSICS_HTTP_CONNECTION_SOCKET_TIMEOUT_MILLISECONDSThe default value is 60000
HEAL_FORENSICS_COMMAND_APIhttps://<Haproxy IP:port>/agent-command
HEAL_FORENSICS_RESULT_APIhttps://< Haproxy IP:port>/agent-forensics
HEAL_FORENSICS_ENABLETrue (False – to disable the feature)
HEAL_FORENSICS_SCHEDULER_INTERVAL_SECONDS10
HEAL_FORENSICS_SSL_SUPPORTED_PROTOCOLSTLSv1.2, TLSv1.3
HEAL_FORENSICS_COMMAND_API_INSTANCE_ID_HEADER_NAMEInstance-ID
HEAL_FORENSICS_COMMAND_API_AGENT_ID_HEADER_NAMEAgent-ID
HEAL_FORENSICS_APPLICATION_SERVER_NAME<application server>
HEAL_FORENSICS_BUFFER_SIZE_KBS16

5. Check for SSL certificates.

Consult with the application or client team to determine if the application uses any SSL certificates.

6. Ensure the ingest pipeline is present in OpenSearch; if not, follow the below steps:

Execute the following command to create an ingest pipeline and apply it to indexes in OpenSearch for data visualization in Grafana (ensure the jim_pipeline.sh has the latest file):

sh jim_pipeline.sh <opensearch_userid:password> <opensearch_host:port> <data_retention_days_count>

7. Update the Grafana IP address, port number, and Jaeger data source name in the JIM Audit Dashboard.json, JIM Summary Dashboard.json, and JIM Deep Dive.json files.

"links": [
  {
    "targetBlank": false,
    "title": "Open Trace",
    "url": "http://<Grafana IP>:<Grafana Port>/explore?orgId=1&left=[\"${ from}\",\"now\",
     \"<Jaeger DS>\",{\"query\":\"${ data.fields[\"Trace ID\"]}\"}]"
  }
],

8. Update the value for the "script" attribute in the following block in the JIM Summary Dashboard.json file.

"metrics": [
{
"field": "thread_cpu_time",
"id": "1",
"settings": {
"script": "_value*<x>"
},
"type": "avg"
}
],

<x>: Get the value as follows.

a) Login to the target server where the JIM agent is running.

b) Execute the following command.

ls cpu

c) The output of the above command contains the frequency of the CPU in the MHz attribute.

d) <x> = (1 / (Frequency in MHz * 1000000))

9. Enable the Jaeger port (default 14250) from the target server to the Jaeger server.

10. Enable the OpenSearch port (default 9200) in the firewall in HEAL servers.

11. Open the Keycloak port from the target server.

Static Configuration#

Note: The following configuration cannot be modified after the JVM has started.

AttributeValue
OpenTelemetry Agent Configuration
otel.traces.exporterjaeger
otel.exporter.jaeger.endpointhttp://@@@JAEGER_HOST@@@:@@@JAEGER_PORT@@@
otel.metrics.exporternone
otel.instrumentation.ht.enabledfalse
Notes:
  • DO NOT CHANGE THE SEQUENCE OF FIELDS IN RESOURCE ATTRIBUTES
otel.resource.attributes=service.name=@@@SERVICE_NAME@@@,agent.uid=@@@AGENT_UID@@@,instance.uid=@@@INSTANCE_UID@@@

JIM Logging
jim.log.file.path@@@PATH_TO_STORE_JIM_AGENT_LOGS@@@
jim.log.pattern[%-12date{YYYY-MM-dd HH:mm:ss.SSS}] [%logger{35}] [%level] - %msg%n
jim.log.file.max.size5MB
jim.log.file.total.size.cap50MB
Heal forensics configuration
heal.forensics.enablefalse
heal.forensics.keystore.file.path<Path of keystore .jks file path>
heal.forensics.keystore.password<Password of keystore file>
heal.forensics.truststore.file.path<Path of truststore .jks file path>s
heal.forensics.truststore.password<Password of truststore file>
Give multiple protocols names separated by commas.
heal.forensics.ssl.supported.protocolsTLSv1.2, TLSv1.3

Dynamic Configuration#

Note: The following configuration can be modified after the JVM has started.

AttributeValue
Heal dynamic reload configuration
slow.transaction.threshold5000
jim.log.levelINFO
Heal forensics configuration
heal.forensics.file.path<Path of parent Dir where you want to store thread dump and heap dump>
heal.forensics.http.connection.timeout.milliseconds900000
heal.forensics.http.connection.socket.timeout.milliseconds900000
heal.forensics.command.apihttps://<Haproxy IP:Port>/agent-command
heal.forensics.result.apihttps://< Haproxy IP:Port>/agent-forensics
heal.forensics.scheduler.interval.seconds10
heal.forensics.command.api.instance.id.header.nameInstance-ID
heal.forensics.command.api.agent.id.header.nameAgent-ID