Common Properties¶
This document contains a list of configurable properties that apply to all the following components: Center, Relay, Web.
For other components, please see these pages:
- Center (properties specific to the Center component)
- Web (properties specific to the Web component)
- Relay (properties specific to the Relay component)
- WebBalancer and WebManager (properties for managing connections to 3forge Web)
General 3forge Properties¶
These properties configure basic runtime behavior of a 3forge application.
Note
Property default values that are prefixed with a # are optional or must be configured by the user before use.
- Default:
- Description:
-
- A comma-delimited list of which components to load
- This can be any combination of:
- the Relay
- the Center
- the Web
- WebBalancer
- WebManager
- See this guide for more
- Default:
- Description:
-
- A small file generated as part of the AMI package to enable clean shutdown of 3forge from an external process or script
- If an external process moves/copies to a file of the same name, but with a
.killsuffix, the process will exit
- Default:
- Description:
-
- The number of threads in the core thread pool (this does not include threads for http servicing or image processing)
- Default:
- Description:
-
- If
true, will use an "aggressive" thread pool - This pool will wake up faster, but uses more CPU while idle
- If
- Default:
- Description:
-
- Directory to where the configuration files are located
- Default:
- Description:
-
- Name of the configuration file loaded at startup
- We do not recommend changing this
- Default:
- Description:
-
- Set timezone for the JVM (this does not control default user or logger timezones)
- Default:
- Description:
-
- Default locale, can be set either as
<language>or<language>_<country> - Fields accept ISO 3166-1 alpha-2/alpha-3/full name
- E.g:
<language>: EN/ENG/ENGLISH<country>: US/USA/UNITED STATES
- Default locale, can be set either as
- Default:
- Description:
-
- The root directory for where log files will be deposited
- Default:
- Description:
-
- Directory of where plugins will be loaded from
- Default:
- Description:
-
- Directory of where additional resources will be placed
- Default:
- Description:
-
- How often 3forge should log general health statistics such as memory, user load, etc
- Can be used for real-time/historical monitoring via the performance dashboard
- Default:
- Description:
-
- Specify a comma-delimited list of naming service plugin classes (implements
com.f1.ami.amicommon.AmiNamingServiceResolver) - These can be used to map logic service names to physical host/ports
- Specify a comma-delimited list of naming service plugin classes (implements
- Default:
- Description:
-
- For more information regarding Content Security Policy, please refer to the this link
- Default:
- Description:
-
- The aes key file used for encrypting/decrypting secure data (see
strEncrypt()/strDecrypt()in the Center methods for examples)
- The aes key file used for encrypting/decrypting secure data (see
- Default:
- Description:
-
- The aes key used for encrypting/decrypting secure columns (instead of using
ami.aes.key.file)
- The aes key used for encrypting/decrypting secure columns (instead of using
Log Properties¶
For debugging purposes, when 3forge launches, it generates a few log files. These are:
-
AmiOne.log- The main log file
- You should refer to this for any issues with your runtime
-
AmiOne.amilog- A machine-readable log file
- Contains information about memory usage, etc.
-
AmiMessages.log- Tracks messages that are being sent to and from 3forge (real-time)
For more information on how to interpret log files, see this page.
Log Property Structure¶
There are a number of properties to configure the log files to your preference. The structure of each property is as follows:
Example¶
- Consider the following property:
-
This is a
streamproperty, which determines how different log messages are streamed into the log file.The flag
INFOrefers to the level of verbosity of the output in the log file, in this case "informative."
Where log files are stored, how many previous logs are kept on disk, and the verbosity of a log message can all be configured via the local.properties file.
Log Files and Directories¶
Note
If you want to change the location of the stderr, stdout, and gc.log files, you will need to manually edit the start.sh file in amione/scripts for each file type.
Properties with the prefix speedlogger.sink determine the file structure of 3forge logs. The default configuration for the basic log file looks like this:
The FILE_SINK property refers to the file that logs are written to. The default directory for logs will be in the root directory of your installation in amione/log, and the default log file is AmiOne.
To change the FILE_SINK configuration to use a different directory or file name, you will need to change the following variables in your local.properties file, which will be referenced in other logging properties:
- Default:
- Description:
-
- Where the log files are stored
- To change, set this property to
f1.logs.dir=path/to/your/directory
- Default:
- Description:
-
- Name of the log file where logs are stored
- To change, set this property to
f1.logfilename=<your_logfile_name>
To change the number of log files that are recorded, set the following properties:
speedlogger.sink.FILE_SINK.maxFiles
- Default:
- Description:
-
- Maximum number of session logs saved before overwriting and deleting
- Sessions are numbered in ascending order (most recent to oldest)
- To change, set this property to your desired value
speedlogger.sink.FILE_SINK.maxFileSizeMb
- Default:
- Description:
-
- Maximum size of a log file in MB
- To change, set this property to your desired value
Wherever FILE_SINK is called in a property will call back to these variables.
Each collection of log types will have their own similar configurable properties, the full list can be found below.
Log Message Appenders¶
The message appenders determine the content and style of a log message that is added to the log file.
For the basic files (AmiOne), a description of the appender properties are below.
speedlogger.appender.BASIC_APPENDER.pattern
- Default:
- Description:
-
- The pattern of the appender's log message
- The default structure is:
%P: log level%d{YMD-h:m:s.S z}: date (format and timezone)[%t]: message origin type%c::%M:: ID of internal AMI class::method call%m: log message/description%D%n: any additional details
speedlogger.appender.BASIC_APPENDER.type
- Default:
- Description:
-
- The implementation of
SpeedLoggerAppenderfactory used - Use the existing
BasicAppenderclass
- The implementation of
speedlogger.appender.BASIC_APPENDER.timezone
- Default:
- Description:
-
- Timezone of an appender's log message
- To change, set this value to any Java accepted timezone
- Default:
- Description:
-
- Properties of the basic logger (how a log message is actually streamed into the log file):
- Which appender (
BASIC_APPENDER)- Pattern determined in
speedlogger.appender.BASIC_APPENDER.pattern
- Pattern determined in
- Which log file (
FILE_SINK) - Which log level (
INFO)
- Which appender (
- Properties of the basic logger (how a log message is actually streamed into the log file):
Warning
We do not recommend changing the pattern or type of appender used for each log message type.
If you require additional information, please reach out to us at support@3forge.com
Log Level Verbosity¶
To adjust the log level for a certain class of logs, replace the corresponding label (the flag at the end of the property) on a stream property with the label you require.
| Code | Full label |
|---|---|
| ALL | All |
| FNE | Fine |
| INF | Info |
| WRN | Warning |
| SVR | Severe |
| OFF | OFF |
Where ALL gives the highest verbosity and OFF gives none.
Speedlogger Properties List¶
Below are the default configurations for each log type.
Basic¶
AmiScript¶
Backend Messages¶
3forge Web Tracking¶
To save 3forge tracking logs to a separate file, remove the comment denotation (#) on lines 7-10.
3forge Statistics¶
Disable or Mute Messages¶
Any time you wish to mute certain messages from showing up in your AmiOne.log, you can use the following template:
- Determine the class of 3forge messages you wish to mute.
-
Add the following line to your
local.properties, replacingCLASSNAMEwith the the class you wish to mute:
Example¶
- Given a log output like this:
-
The property would be:
REST API Properties¶
AMI provides a REST server that can be used to query performance and other statistics of the application. More information can be found on here.
REST Endpoint Properties¶
These properties configure the AMI REST API endpoint addresses.
- Default:
- Description:
-
- List of classes that implement
com.f1.ami.amicommon.rest.AmiRestPlugin
- List of classes that implement
- Default:
- Description:
-
- Class for authentication
- Default:
- Description:
-
- If there is an exception in the endpoint, list it in the REST response
- Convenient for debugging, but less secure
- Default:
- Description:
-
- Determines whether all endpoints should be shown when browsing to /3forge_rest
- Convenient for debugging, but less secure
- Default:
- Description:
-
- If
true, uses the same port as the HTTP port (access via appending/3forge_restto the HTTP address) - If
false, you will need to manually configure the port usingami.rest.http.port
- If
REST Server Host Properties¶
If you opt to host the REST server on a different port to the Web, you will need to configure at least the following property to host the REST server on the local machine:
Otherwise, the minimum configuration for a HTTP connection is the following:
The full list of configurable REST properties is listed below.
HTTP Connection to REST Server¶
- Default:
- Description:
-
- The HTTP port the REST server should use
- Default:
- Description:
-
- Specifies the network interface that the REST server HTTP port will be bound to
- Default:
- Description:
-
- Provide either a list of permitted hostname patterns, or a plugin for blocking/granting access based on foreign network address
- Syntax:
- file:
file:<file_containing_a_hostname_patterns_per_line\> - text:
text:<newline_delimited_list_of_hostname_patterns> - plugin:
plugin:<class_name_implementing_com.f1.ami.amicommon.AmiServerSocketEntitlementsPlugin\>
- file:
HTTPS Connection to REST Server¶
- Default:
- Description:
-
- Specifies the HTTPS port the REST server should use for secure access
- Default:
- Description:
-
- Specifies the network interface that the REST server HTTPS port will be bound to
- Default:
- Description:
-
- Provide either a list of permitted hostname patterns, or a plugin for blocking/granting access based on foreign network address
- Syntax:
- file:
file:<file_containing_a_hostname_patterns_per_line\> - text:
text:<newline_delimited_list_of_hostname_patterns> - plugin:
plugin:<class_name_implementing_com.f1.ami.amicommon.AmiServerSocketEntitlementsPlugin\>
- file:
ami.rest.https.keystore.contents.base64
- Default:
- Description:
-
- If using an SSL connection, supply contents of a keystore as base64
- Default:
- Description:
-
- Supply if using an SSL connection
- Path to the keystore file (using Oracle keytool)
Java Virtual Machine (JVM) Properties¶
3forge runs in the JVM which takes a set of Java options that configure its behavior and how the application is built.
The JVM properties are configured in a .vmoptions file located in the amione directory of the 3forge installation. Depending on the OS, this is either:
AMI_One.vmoptions(for Windows)AMI_One_linux.vmoptions(for Linux)
These properties are then parsed in start.sh and used to launch AMI correctly.
Some of these properties control how messages are logged and how garbage collection is handled. Here are some examples of the JVM Properties:
Java Properties
- Forces Java to use the 3forge logger
- Forces other 3rd party plugins that were written for log4j to use 3forge logger instead
3forge Properties
- Controls where 3forge will write proc information on the application's uptime/downtime
- Comma delimited list of where the
f1license.txtfile(s) should be looked for
- The file containing the
f1.license.fileproperty which points to the license file
- Directory where the
root.propertiesfile is located
- Comma-delimited list of keyfiles for encrypting and decrypting
.propertiesfiles - If specified, the
${CIPHER:xxxxxx}syntax within.propertiesfiles will be decoded using the keyfile's key - See this page on encrypting
.propertiesfiles