Prerequisites
Prerequisites in JIM Agent Installation & Configuration Guide.
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#
| Attribute | Value |
|---|---|
| OpenTelemetry Agent Configuration | |
otel.traces.exporter | The value is based on your data format. For example: Jaeger, OTLP, or Zipkin. The default value is OTLP. |
otel.exporter.<data format value>.endpoint | Enter 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:
| |
otel.resource.attributes | Enter the identifiers of the service, agent, and instance. * Ensure each JVM installation's agent ID and instance ID are unique. |
otel.instrumentation.ht.enable | false (The default value is false, and enable it only when capturing the request and response body of the traces). |
| HEAL Configuration | |
slow.transaction.threshold | The 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.milliseconds | The default value is 90000 |
heal.forensics.http.connection.socket.timeout.milliseconds | The default value is 90000 |
heal.forensics.command.api | https://<Haproxy IP:port>/agent-command |
heal.forensics.result.api | https://< Haproxy IP:port>/agent-forensics |
heal.forensics.enable | True (False – to disable the feature) |
heal.forensics.scheduler.interval.seconds | 10 |
| Provide multiple protocol names separated by commas. | |
heal.forensics.ssl.supported.protocols | TLSv1.2 |
heal.forensics.command.api.instance.id.header.name | Instance-ID |
heal.forensics.command.api.agent.id.header.name | Agent-ID |
| Provide application server names (for example: Tomcat, JBoss, WebSphere, or WebLogic). | |
heal.forensics.application.server.name | <application server> |
heal.forensics.buffer.size.kbs | 16 |
| JIM Logging | |
jim.log.file.path | Specify 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.pattern | This 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.size | This 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.cap | Specify 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.level | Mention 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:
| Attribute | Value |
|---|---|
| OpenTelemetry Agent Configuration | |
otel.traces.exporter | jaeger |
otel.exporter.jaeger.endpoint | http://192.0.2.59:14250 |
otel.metrics.exporter | None |
otel.resource.attributes=service.name | Tomcat_232,agent.uid=JIMAgent_232,instance.uid=Tomcat_comp_Instance |
| HEAL Configuration | |
slow.transaction.threshold | 5000 |
| 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.milliseconds | 900000 |
heal.forensics.http.connection.socket.timeout.milliseconds | 900000 |
heal.forensics.command.api | https://192.0.2.60:9998/agent-command |
heal.forensics.result.api | https://192.0.2.60:9998/agent-forensics |
heal.forensics.enable | true |
heal.forensics.scheduler.interval.seconds | 10 |
| Provide multiple protocol names separated by commas. | |
heal.forensics.ssl.supported.protocols | TLSv1.2 |
heal.forensics.command.api.instance.id.header.name | Instance-ID |
heal.forensics.command.api.agent.id.header.name | Agent-ID |
| Provide application server names (for example: Tomcat, JBoss, WebSphere, or WebLogic). | |
heal.forensics.application.server.name | websphere |
heal.forensics.buffer.size.kbs | 16 |
| 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.size | 1MB |
jim.log.file.total.size.cap | 5MB |
jim.log.level | INFO, TRACE & DEBUG (provide one of these values) |
JIM v1.3.0 & above#
| Attribute | Value |
|---|---|
| OpenTelemetry Agent Configuration | |
otel.traces.exporter | The value is based on your data format. For example: OTLP. The default value is OTLP. |
otel.exporter.otlp.endpoint | Endpoint values: otel.expoter.otlp.end point * Ensure the required ports are open at the endpoint. |
otel.metrics.exporter | * None. |
Notes:
| |
otel.resource.attributes | Enter the identifiers of the service, agent, and instance. * Ensure each JVM installation's agent ID and instance ID are unique. |
otel.logs.exporter | none |
otel.java.disabled.resource.providers | io.opentelemetry.instrumentation.resources.HostResourceProvider, io.opentelemetry.instrumentation.resources.OsResourceProvider, io.opentelemetry.instrumentation.resources.ProcessRuntimeResourceProvider, io.opentelemetry.instrumentation.resources.AwsResourceProvider |
otel.experimental.resource.disabled.keys | telemetry.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.milliseconds | The default value is 90000 |
heal.forensics.http.connection.socket.timeout.milliseconds | The default value is 90000 |
heal.forensics.command.api | https://<Haproxy IP:port>/agent-command |
heal.forensics.result.api | https://< Haproxy IP:port>/agent-forensics |
heal.forensics.enable | True (False – to disable the feature) |
heal.forensics.scheduler.interval.seconds | 10 |
heal.forensics.ssl.supported.protocols | TLSv1.2 (Provide multiple protocol names separated by commas.) |
heal.forensics.command.api.instance.id.header.name | Instance-ID |
heal.forensics.command.api.agent.id.header.name | Agent-ID |
heal.forensics.application.server.name | <application server> [Provide application server names (for example: tomcat, jboss, WebSphere, or WebLogic)]. |
heal.forensics.buffer.size.kbs | 16 |
| 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.milliseconds | The default value is 60000 |
Dheal.forensics.http.connection.socket.timeout.milliseconds | The default value is 60000 |
Dheal.forensics.command.api | https://<Haproxy IP:port>/agent-command |
Dheal.forensics.result.api | https://< Haproxy IP:port>/agent-forensics |
Dheal.forensics.enable | True (False – to disable the feature) |
Dheal.forensics.scheduler.interval.seconds | 10 |
Dheal.forensics.ssl.supported.protocols(# Give multiple protocols names separated by commas) | TLSv1.2, TLSv1.3 |
Dheal.forensics.command.api.instance.id.header.name | Instance-ID |
Dheal.forensics.command.api.agent.id.header.name | Agent-ID |
Dheal.forensics.application.server.name | <application server> |
Dheal.forensics.buffer.size.kbs | 16 |
| 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_MILLISECONDS | The default value is 60000 |
HEAL_FORENSICS_HTTP_CONNECTION_SOCKET_TIMEOUT_MILLISECONDS | The default value is 60000 |
HEAL_FORENSICS_COMMAND_API | https://<Haproxy IP:port>/agent-command |
HEAL_FORENSICS_RESULT_API | https://< Haproxy IP:port>/agent-forensics |
HEAL_FORENSICS_ENABLE | True (False – to disable the feature) |
HEAL_FORENSICS_SCHEDULER_INTERVAL_SECONDS | 10 |
HEAL_FORENSICS_SSL_SUPPORTED_PROTOCOLS | TLSv1.2, TLSv1.3 |
HEAL_FORENSICS_COMMAND_API_INSTANCE_ID_HEADER_NAME | Instance-ID |
HEAL_FORENSICS_COMMAND_API_AGENT_ID_HEADER_NAME | Agent-ID |
HEAL_FORENSICS_APPLICATION_SERVER_NAME | <application server> |
HEAL_FORENSICS_BUFFER_SIZE_KBS | 16 |
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.
| Attribute | Value |
|---|---|
| OpenTelemetry Agent Configuration | |
otel.traces.exporter | jaeger |
otel.exporter.jaeger.endpoint | http://@@@JAEGER_HOST@@@:@@@JAEGER_PORT@@@ |
otel.metrics.exporter | none |
otel.instrumentation.ht.enabled | false |
Notes: | |
| 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.size | 5MB |
jim.log.file.total.size.cap | 50MB |
| Heal forensics configuration | |
heal.forensics.enable | false |
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.protocols | TLSv1.2, TLSv1.3 |
Dynamic Configuration#
Note: The following configuration can be modified after the JVM has started.
| Attribute | Value |
|---|---|
| Heal dynamic reload configuration | |
slow.transaction.threshold | 5000 |
jim.log.level | INFO |
| 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.milliseconds | 900000 |
heal.forensics.http.connection.socket.timeout.milliseconds | 900000 |
heal.forensics.command.api | https://<Haproxy IP:Port>/agent-command |
heal.forensics.result.api | https://< Haproxy IP:Port>/agent-forensics |
heal.forensics.scheduler.interval.seconds | 10 |
heal.forensics.command.api.instance.id.header.name | Instance-ID |
heal.forensics.command.api.agent.id.header.name | Agent-ID |