...
It is possible to omit the above line in the configuration file and specify the repository information and agent name via the JVM parameters. When lunching launching the application to be monitored it is necessary to add following parameter to the JVM parameters:
Code Block |
---|
-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;agentNamerepositoryPort and the inspectit.agent.name is just the full name.
Tip | ||
---|---|---|
| ||
Setting of the repository details and agent name via JVM parameters can be very handy when multiple agents share the same configuration and should be connected to different CMRs or to the same CMR with different agent names. |
...
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:
Code Block |
---|
send-strategy info.novatec.inspectit.agent.sending.impl.TimeStrategy time=5000 send-strategy info.novatec.inspectit.agent.sending.impl.ListSizeStrategy size=10 |
...
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
Code Block |
---|
buffer-strategy info.novatec.inspectit.agent.storage.impl.SizeBufferStrategy size=12 buffer-strategy info.novatec.inspctit.agent.storage.impl.SimpleBufferStrategy |
...