Common Properties¶
AMI Properties¶
Applies to Components: Center, Relay, Web, WebBalancer.
-
Default:
config//../.amionemain.prc
- A small file that is created and monitored by AMI
- If an external process moves/copies to a file of the same name, but with a
.kill
suffix, the process will exit. - This provides any easy way for an external script or job control process to cleanly shutdown AMI.
-
Default:
8
- The number of threads in the core thread pool (this does not include threads for http servicing or image processing).
-
Default:
true
- If true will use an "aggressive" thread pool.
- This pool will wake up faster, but uses more CPU while idle.
-
Default:
amione/config
- Directory to where the configuration files are located.
-
Default:
root.properties
- Name of the configuration file loaded at start up.
-
Default:
UTC
- Set timezone for Java (this does not control default user or logger timezones).
-
Default:
default
- Default locale.
-
Default:
amione/log
- The root directory for where log files will be deposited.
-
Default:
amione/plugins
- Directory of where plugins will be loaded from.
-
Default:
amione/resources
- Directory of where additional resources will be placed.
-
Default:
relay,center,web
- A comma-delimited list of which components to load.
- This can be any combination of:
- relay
- center
- web
- webbalancer
- webmanager
-
Default:
15 SECONDS
- How often AMI should log general health statistics such as memory, user load, etc.
- Can be used for real-time/historical monitoring via the performance dashboard.
-
Default: Optional
- 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:
img-src 'self' https://*.mapbox.com data: w3.org/svg/2000; default-src https://*.mapbox.com 'self' 'unsafe-inline' 'unsafe-eval' blob:
- For more information regarding Content Security Policy, please refer to the this link.
-
Default:
persist/amikey.aes
- 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: Optional
- 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
-
Default:
128
- Key strength, e.g: 128.
Log Properties¶
For debugging purposes, when AMI launches, it generates a few log files. These are:
-
AmiLog.log
- The main log file.
- You should refer to this for any issues with your runtime.
-
AmiLog.amilog
- A machine-readable logfile.
- Contains information about memory usage etc.
-
AmiMessages.log
- Tracks messages that are being sent to and from AMI (realtime).
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:
For example, the property:
is a stream
property, which determines how different log messages are streamed into the log file. The flag INFO
refers 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 stderr
, stdout
, and gc.log
, you can do a search and replace on the start.sh
to another location. Search for /log
.
Properties with the prefix speedlogger.sink
determine the file structure of AMI 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 AMI installation in amione/log
, and the default log file is AmiLog
.
To change the FILE_SINK
configuration to use a different directory or file, you will need to change the following variables in your local.properties
file, which will be referenced in other logging properties:
-
Default:
amione/log
- Where the log files are stored.
- To change, set this property to
f1.logs.dir=path/to/your/directory
.
-
Default:
AmiLog.log
- Where the log files are stored.
- To change, set this property to
f1.logfilename=your_logfile_name
.
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 here in this document.
For example, for the basic properties; to change the number and size of log files, you will need to alter these properties:
-
Default:
10
- 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.
-
Default:
1000
- Maximum size of a log file.
- To change, set this property to your desired value.
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, the appender properties are below.
-
Default:
BasicAppender
- The implementation of
SpeedLoggerAppender
factory used. - We recommend using the existing
BasicAppender
class.
- The implementation of
-
Default:
EST5EDT
- Timezone of a log message
- To change, set this value to any Java accepted timezone.
-
Default:
BASIC_APPENDER;FILE_SINK;INFO
-
Properties of the basic logger:
- Which appender (
BASIC_APPENDER
) - Which log file (
FILE_SINK
) - Which log level (
INFO
)
- Which appender (
-
Log Levels¶
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¶
AMI Web Tracking¶
To save AMI tracking logs to a separate file, remove the comment denotation (#) on lines 7-10.
AMI Statistics¶
Disable per-class¶
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 AMI message you wish to mute.
-
Add the following line to your
local.properties
, replacingCLASSNAME
with the the class you wish to mute:
For example, given a log output like this:
The class name would be com.f1.ami.amicommon.centerclient.AmiCenterClientState
.
Java VM Properties¶
The Java VM Properties can be configured in AMI_One.vmoptions
(for Windows) or AMI_One_linux.vmoptions
(for Linux), which are parsed in start.sh
. Some of these properties control how messages are logged and how garbage collection is handled. Here are some concrete examples of Java VM Properties
-Df1.global.procinfosink.file=./.f1proc.txt
: controls where AMI will write proc information. Note, this proc information includes uptime/downtime/process id/and processuid-Df1.license.file=${HOME}/f1license.txt,f1license.txt,config/f1license.txt
: comma delimited list of where the f1license.txt file(s) should be looked for-Df1.license.property.file=config/local.properties
: The file that contains a line in the format f1.license.file=xxxxx which points to the license file-Dproperty.f1.conf.dir=config/
: Directory where the root.properties is located.-Djava.util.logging.manager=com.f1.speedlogger.sun.SunSpeedLoggerLogManager
: Forces java to use the 3Forge logger-Dlog4j.configuratorClass=com.f1.speedloggerLog4j.Log4jSpeedLoggerManager
: Forces other 3rd party plugins that were written for log4j to use 3Forge logger instead-Dlog4j.configuration=com/f1/speedloggerLog4j/Log4jSpeedLoggerManager.class
: Forces other 3rd party plugins that were written for log4j to use 3Forge logger instead-Dproperty.f1.properties.secret.key.files=/path/to/keyfile
: If specified, the ${CIPHER:xxxxxx} syntax within .properties files will be decoded using the file's key. (See tools.sh for creating a key). comma delimit for multiple files-Dproperty.f1.properties.decrypters=[DECRYPTERID]=com.package.DecrypterClass
: If specified, the ${CIPHER:[DECRYPTERID]:xxxxxx} syntax within .properties files will be decoded using class. (See com.f1.utils.encrypt.Decrypter Interface) Comma delimit for multiple classes