General Settings
The configuration of an inspectIT agent must include a general settings section that includes information about the CMR the data is sent to and additional setting concerning sending and buffering strategies. This page provides an explanation of these settings.
Repository
The repository setting defines the location of the CMR the data should be sent to. The IP and port defines the location of the CMR (to be more concrete these settings define the location of the RMI registry in which the CMR is registered). The agent name allows to set an unique name for this agent. An CMR can gather data from multiple agents, thus a meaningful agent name allows for an easier recognition.
# repository <IP> <port> <Agent name> repository localhost 9070 MyTestAgent
This configuration snippet defines that the agent should sent its data to an CMR running on localhost using the port 9070 (RMI registry). The agent itself will be called MyTestAgent.
Sending strategies
The Agent has to know when to send its measurements to the CMR. For that purpose, sending strategies can be added. At least one is needed, otherwise, the data will never be sent and thrown away. The element name is send-strategy with the fully-qualified-name as the first option and some sending strategy specific options like time or size.
Sending strategy | Description | Options | Class |
---|---|---|---|
Time Strategy | This strategy will cause the Agent to send its measurements after a specific interval. This interval can be set by using the option time=<milliseconds>. | time=<milliseconds> | info.novatec.inspectit.agent.sending.impl.TimeStrategy |
List Size Strategy | This strategy will cause the Agent to send its measurements after a specific size of value objects is reached. The size can be set by using the option size=<size> | size=<size> | info.novatec.inspectit.agent.sending.impl.ListSizeStrategy |
Examples:
send-strategy info.novatec.inspectit.agent.sending.impl.TimeStrategy time=5000 send-strategy info.novatec.inspectit.agent.sending.impl.ListSizeStrategy size=10
Buffer strategy
The next important aspect to configure is how the Agent should handle connection problems when they appear. One could imagine that there is no buffer at all, or a specified size etc. After a connection is reestablished, the buffer will return all the elements it contains and they will be send to the CMR. There can only be one active buffer strategy as it doesn't make much sense to have more.
Buffer strategy | Description | Options | Class |
---|---|---|---|
Simple Buffer | The simplest version of a buffer is apparently no buffer at all. It contains exactly one element. This is useful if old data isn't necessary or maybe the memory of the application is very limited. | none | info.novatec.inspectit.agent.storage.impl.SimpleBufferStrategy |
Size Buffer | This buffer strategy needs an addition option called size=<size>to set the size of this buffer. This buffer works as a FILO stack, so last added elements will be sent first (as they are more important), and old ones are thrown away if this buffer is full | size=<size> | info.novatec.inspectit.agent.storage.impl.SizeBufferStrategy |
Examples
buffer-strategy info.novatec.inspectit.agent.storage.impl.SizeBufferStrategy size=12 buffer-strategy info.novatec.inspctit.agent.storage.impl.SimpleBufferStrategy
Exclude classes
from version 1.4
Expert user level
Only users with expert level knowledge are suggested to use this option.
The agent configuration enables definition of the patterns that can be used for excluding classes from instrumentation. The configuration file AGENT_CONFIGURATION/common/exclude-classes.cfg defines the set of default patterns for classes that should be excluded. If there is a need not to instrument specific class (or set of classes), users can define their patters in addition to the default ones with following configuration lines:
exclude-class my.package.MyClass exclude-class my.package.impl.*
The fully qualified name of the class has to be specified or wild-cards can be used. Note that the default set of exclude patterns have to always be included in order Agent to work properly.