Setting the repository and agent name via JVM parameters

The agent needs only two settings passed via the JVM parameters in oder to start and get the correct configuration from the repository:

SettingParameterDescription
CMR location
-Dinspectit.repository=
The location where the CMR is running that this agent should pass the data to. We expect IP/DNS plus port in the format [dns/ip]:[port]
Unique Agent name
-Dinspectit.agent.name=
The name that is used to identify the agent. An CMR can gather data from multiple agents, thus a meaningful agent name allows for an easier recognition. Please note that this name needs to be unique.

 

These properties are set via JVM parameters. When launching the application to be monitored it is necessary to add following parameter to the JVM parameters:

-Dinspectit.repository=localhost:9070 -Dinspectit.agent.name=MyTestAgent

As you can notice the value of the inspectit.repository parameter should be in the form of repositoryIp:repositoryPort and the inspectit.agent.name is just the full name.

Communication Check between Agent and CMR

You can verify if communication works between Agent and CMR with a small test. For more details, have a look at the post inspectIT – Check communication between Agent and CMR published on the NovaTec Blog.


The name of the agent can be set with a pattern. If you can use the pattern name feature the name must be written in one of these ways:


-Dinspectit.agent.name='${systemProperty}_agentName'
-Dinspectit.agent.name='agent_${systemProperty}_name'
-Dinspectit.agent.name='agentName_${systemProperty}'


If the systemProperty is a property that is set in the system, as, for instance, "oracle.ons.indexid", if the name want to be set with a pattern built with a environment variable just use the expression:


-Dinspectit.agent.name=${enrionmentVariable}_agentName
-Dinspectit.agent.name=agent_${enrionmentVariable}_name
-Dinspectit.agent.name=agentName_${enrionmentVariable}


If the system does not find a match it will return "NA" in the place of the pattern. Please, realize that this feature just covers one pattern for every name of the agent. This feature allows systems to separate names for processes, as done in clusters.