In order to support the externalized configuration inspectIT Ocelot provides several methods. These methods represent a bridge between certain configuration providers and the inspectIT Ocelot agent. This way, a configuration can be provided from different sources, for example, file systems, the internet, external services, configuration services, vaults, etc.
The configuration method is considered dynamic if it supports run-time updates. For example, if the configuration file changes on disk, the file-based configuration method will report the updated properties to the inspectIT Ocelot agent. The agent will then update the internal configuration, effectively changing the behavior of the agent during the run-time.
Note that not all inspectIT Ocelot configuration properties support dynamic updates. In addition, the Java System properties and OS environment variables always have higher priority, thus dynamically changing a property which is also defined in those sources will have no effect.
All externalized configuration methods must be enabled using Java System properties or OS environment variables, as they are disabled by default. You can have more than one method active at the same time, thus pulling the configuration from different sources.
|Method||Dynamic updates||Enabled by default|
The file-based configuration loads all
.properties files in alphabetical order from the given directory path in non-recursive mode.
The alphabetical order of files defines their priority, thus if the same property exists in
yours.properties files, then the one from the
my.properties file will be used.
The file-based configuration is activated by specifying the path to an existing directory in the
It automatically watches for changes in the given directory and reports updates to inspectIT Ocelot agent.
If you would like to disable the dynamic updates you can set the
inspectit.config.file-based.watch property to
In addition it is possible to configure the frequency at which the agent checks the directory for changes.
This is done by specifying the duration
|-||The path to the directory to scan for configuration files. An existing directory must be specified for the file-based configuration to be enabled.|
|Can be used to disable the file-based configuration while the path is still specified.|
|Specifies the frequency at which the configuration directory will be checked for changes. When setting the frequency to zero, no polling is performed. Instead the agent listens for filesystem events published by the operating system to detect changes.|
You must make sure that the access to your configuration directory is restricted in the same way you would restrict access to your application code or startup script. Otherwise the concept of actions of inspectIT Ocelot could make your application prone to code injection!