How to pass property values to APM Infrastructure Agent java arguments
search cancel

How to pass property values to APM Infrastructure Agent java arguments

book

Article ID: 191308

calendar_today

Updated On:

Products

CA Application Performance Management Agent (APM / Wily / Introscope) CA Application Performance Management (APM / Wily / Introscope) INTROSCOPE DX Application Performance Management

Issue/Introduction

We would like to add agent properties as Java System Properties as we do for normal Java agents but could not find a way to add them in the startup script APMIAAgent.sh so that they were passed to the JVM command line.

Environment

Release : 11.1, 19.x, 20.x

Component : APM Agents

Cause

The APMIA runs via a wrapper so it's parameters can be specified in the wrapper configuration file conf/wrapper.conf.

Resolution

APMIA properties that would normally be specified in an extension bundle.properties can be passed in as Java aguments using the property values wrapper.java.additional.n in the conf/wrapper.conf file.

For example adding the following property / value pairs

wrapper.java.additional.1=-Dattribute.decoration.static.attributes.configurations.default.attributeName=Cuthbert
wrapper.java.additional.2=-Dattribute.decoration.static.attributes.configurations.default.value=Texas

results in the paramters being added to the java arguments for the process running the APMIA

root      80212  80208  0 May20 ?        00:08:15 /APMIA/apmia20.1.0.44/jre/bin/java -Dattribute.decoration.static.attributes.configurations.default.attributeName=Cuthbert -Dattribute.decoration.static.attributes.configurations.default.value=Texas -Xms256m -Xmx512m -Djava.library.path=lib -classpath lib/Agent.jar:lib/CollectorAgent.jar:lib/EPAgent.jar:lib/UnifiedMonitoringAgent.jar:lib/accessors-.......

and the result can be verified in the agent behaviour as in this example for the properties set



More property settings can be added to the file, simply increment the counter

wrapper.java.additional.3=
wrapper.java.additional.4=
.....