Agent
Agent is a native library, which is attached to JVMs. It runs on a JVM and its main goal is to collect data from applications running on the JVM and the JVM itself.
Each agent is attached to a JVM. It initiates a single bidirectional TCP connection to the Flopsar server.
Agent is started by adding the following option to a java command:
-agentpath:<>=<>For example, if the option -agentpath:/opt/flopsar/libflopsar.so=opt1,opt2 is specified, the agent will be loaded from the /opt/flopsar/libflopsar.so file and the configuration options opt1,opt2 will be passed to it.
Configuration
Agent configuration is specified by a set of options. There are two types of settings: mandatory and optional.
Mandatory Options
Each option must be specified in a form: key=value, where key is an option name. They must be specified along with the agent library itself.
appApplication name, the agent is assigned to,serverSocket address of the Flopsar server. Agents initiate connections to this server and the connections are maintained until the agents are shutdown. It should be specified in the formIPv4:port,homePath to the agent working directory. This directory contains the agent extensions and logs.
The following option
-agentpath:/opt/agent/libflopsar.so=app=MyApplication,server=192.168.10.11:9000,home=/opt/flopsarwill be evaluated as follows:
the agent will be loaded from the
/opt/agent/libflopsar.sofilethe agent will be attached to MyApplication
the agent will attempt to connect to the Flopsar server at
192.168.10.11:9000the agent will store its logs to
/opt/flopsarand load its extension from/opt/flopsar/extdirectory.
Additional Options
Each option must be specified in a form: -Dflopsar.key=value, where key is one of the following values:
name
Auto-generated and reset every time the agent starts
Agent instance name.
ext
org.flopsar.ext
A package name, which all extensions classes come from. Classes from these packages will be loaded by the agent from the ext sub-directory in the agent working directory. Note, that no class coming from the specified package will be instrumented since the agent assumes these are extension classes.
clex
-
A list of class loaders, that should be excluded from instrumentation. The list entries should be fully qualified class names separated by the + sign.
bcp
false
A feature, which changes the way how the com.flopsar.Flopsar class is loaded into the Bootstrap ClassLoader. If set to true, the agent will extract a flopsar.jar file into the agent home directory and add it to the bootstrap classloader path. If either absent or set to false, the agent will load the com.flopsar.Flopsar class into the Bootstrap ClassLoader internally. This option is usually used if you get exceptions like java.lang.NoClassDefFoundError: com/flopsar/Flopsar
qsize
10 MiB
Maximum size of the agent outbound queue size. By setting this option you specify how much memory the agent can use for the queue. The value should be specified along with the unit, e.g. 30mib, 20m, 50M, 30MiB, 4gib etc.
log.size
50 MiB
Maximal size a single logger file can reach. When the value is reached, the logger file is rolled.
log.cnt
5
Maximal number of rolled logger files.
log.debug
false
Sets the logger level to DEBUG.
Last updated