Adding apminsight.conf properties as the JVM's application properties

Add APM Insight configuration properties as JVM system properties

The APM Insight Java agent allows you to specify the configuration properties from the apminsight.conf file as JVM system properties. This provides an alternative to maintaining configuration values in the configuration file.

This approach is especially useful when multiple Java applications are running on the same server. Instead of creating separate copies of the Java agent for each application, you can provide application-specific properties (such as the application name and agent server port) as JVM system properties while sharing the same agent installation.

Specify these properties along with the primary -javaagent argument by prefixing each property with -D.

Please find the names and examples of the properties below.

apminsight.conf file entry

System property key
Example/Format

license.key

apminsight.license.key
1234567890abcdef

application.name

apminsight.application.name
My Application

agent.server.port

apminsight.agent.server.port
8080

Proxy config

apminsight.agent.proxy
user:pswd@host:port

apminsight.log.dir

apminsight.log.dir
/usr/local/qa-123/logs
Notes
You can specify all or only the required configuration properties as JVM system properties.

Example:
  1. -javaagent:/usr/local/qa-123/site24x7/apminsight-javaagent.jar -Dapminsight.application.name=qa_zylker -Dapminsight.license.key=1234567890abcdef 
You can add additional JVM system properties in the same manner, for example:
  1. -Dapminsight.agent.server.port=8080 -Dapminsight.log.dir=/usr/local/qa-123/logs -Dapminsight.agent.proxy=user:password@proxy.example.com:8080


When should you use JVM system properties?

Using JVM system properties is recommended in the following scenarios:
  1. When multiple Java applications are running on the same server and share a single APM Insight Java agent installation.
  2. When you want to avoid maintaining multiple copies of the Java agent with different apminsight.conf files in the server.
  3. When application-specific configuration is managed as part of the application’s startup command or deployment process.