Configure Agent Log File Size
IIB Agent creates a separate log file for each execution group. Therefore, each log continuously grows, even if the execution group is not instrumented.
Hence, a need to stop pushing the updates to the logs for non-instrumented execution groups arises. IIB Agent now allows you to configure the log file size according to your requirement.
The following setting in the configuration file, controller-info.xml
allows
you to configure the log file size of the agent:
<log-settings>
<log-setting broker="" execution-group="">
<max-file-size></max-file-size>
</log-setting>
</log-settings>
The settings are defined as follows:
Setting | Description |
---|---|
<log-settings></log-settings> | Header tag |
<log-setting broker="" execution-group=""> | Broker name and the execution group name, which must be strings |
<max-file-size> </max-file-size> | The maximum size of the log file. The format is
<number><unit> . For example, 5 MB. Valid units are
"MB" or "KB". The accepted range in KB is [200KB, 999KB] and in MB it is [1MB, 999MB].
Every execution group has its own log file. |
However, you need to note the following guidelines for the configuration:
- If a broker is not named, the setting applies to all the brokers.
- If an execution group is not named, the setting applies to all the execution groups.
- An execution group name must be accompanied by a broker name.
For example, in the following configuration, there are three instances of log setting:
<controller-info>
<controller-host></controller-host>
<controller-port></controller-port>
<controller-ssl-enabled></controller-ssl-enabled>
<account-name></account-name>
<account-access-key></account-access-key>
<application-name></application-name>
<tier-name></tier-name>
<user-exit></user-exit>
<log-level></log-level>
<enable-extended-logging></enable-extended-logging>
<controller-cert-file></controller-cert-file>
<controller-cert-dir></controller-cert-dir>
<log-settings>
<log-setting broker="" execution-group="">
<max-file-size>200KB</max-file-size>
</log-setting>
<log-setting broker="Broker1" execution-group="EG1">
<max-file-size>2MB</max-file-size>
</log-setting>
<log-setting broker="Broker1" execution-group="">
<max-file-size>3MB</max-file-size>
</log-setting>
</log-settings>
</controller-info>
The order of preference is mentioned in the following table. The preference order is defined as 1 → 2 → 3 → 4. Hence, if an order is invalid or does not match, then the next valid order is considered.
Order Number | Preferences | Order Template |
---|---|---|
1 | Execution-Group |
<log-setting broker="Broker1" execution-group="EG1">
|
2 | Broker |
<log-setting broker="Broker1" execution-group="">
|
3 | Across multiple-broker |
<log-setting broker="" execution-group="">
|
4 | Default | Agent default is applied which is 10MB |
The following are the valid values, for different execution groups when used with the above example configurations.
Broker Name | Execution Group Name | Valid Values (max-file-size) |
---|---|---|
Broker1 | EG1 | 2MB |
Broker1 | All other EGs | 3MB |
All other Brokers | All other EGs | 200KB |