BAM Service Configuration
All configuration settings are stored in the general appsettings.json file, in a section called LogProcessing.
Below is a configuration example that is very close to the default settings:
{
"LogProcessing": {
"OperatingMode": "Fixed",
"FileProcessing": {
"Enabled": true,
"IntervalTimeMinutes": 1
},
"Cleaning": {
"Enabled": true,
"CleaningTime": "23:30:00",
"DaysToKeep": 15,
"MaximumLogDataSizeGByte": 10
},
"Maintenance": {
"Enabled": false,
"MaintenanceDay": "Sunday",
"UpdateStats": false,
"UpdateIndexes": "None",
"DatabaseShrinking": false
},
"AdaptiveCpuBoundaries": {
"CpuLowerBoundaryPercentage": 40,
"CpuUpperBoundaryPercentage": 80
}
},
"ConnectionStrings": {
"OmetaFrameworkDatabase": "Data Source=sqlserver.domain.net;database=OmetaFramework;trusted_connection=yes;",
"OmetaDcsDatabase": "Data Source=sqlserver.domain.net;database=OmetaDynamicCaseSystem;trusted_connection=yes;",
"OmetaBamDatabase": "Data Source=sqlserver.domain.net;database=OmetaBAMLogging;trusted_connection=yes;"
}
}
Note
The subsection AdaptiveCpuBoundaries is not required in the example as the OperatingMode
property is set to Fixed
. The subsection is only included for completeness.
Regarding a partitioned log table, nothing additional must be configured. The BAM service will automatically detect the structure of the log table and activate the proper logic to handle the differences.
Database Connection Strings
All database connection strings are mandatory. Without them, the service will not be able to do any work. Basically only the BAM database is really needed but the BAM service uses a couple components from the Ometa framework internals and they need to have the database connections available to execute correctly.
If not changed already, adapt for each connection string, the server name (Data Source) and database name (database) accordingly. For example:
"Data Source=sqlserver.domain.net;database=OmetaBAMLogging;trusted_connection=yes;"
To get more detailed information about the connection strings, consult BAM Logging Configuration Connection Strings.
Configuration Details
All paragraphs describe each subsection in detail. The provided default values only apply if a full subsection is missing but not all subsections. When all subsections are not defined, the service will fallback to other settings, describe here: Fallback Configuration.
Operating Mode
The property OperatingMode has 2 possible values:
Fixed
: the BAM service runs with Normal process priority. This is the default value.Adaptive
: the service process priority is changed according the average CPU load.
Adaptive CPU Boundaries
When Adaptive
is selected, the BAM service will look to the AdaptiveCpuBoundaries subsection for additional settings.
Property | Description | Default Value |
---|---|---|
CpuLowerBoundaryPercentage | Sets the lower CPU load boundary, beneath which the BAM service will run with Normal process priority. | 40 |
CpuUpperBoundaryPercentage | Sets the upper CPU load boundary, above which the BAM service will run with Idle process priority. | 80 |
File Processing Settings
These settings control the execution of the file processing job.
Property | Description | Default Value |
---|---|---|
Enabled | Controls the execution of the file processing job. To enable set to true , or disable to false . |
false |
IntervalTimeMinutes | Defines the interval between task executions. No negative values, maximum value is 65535 . |
1 |
Note that when IntervalTimeMinutes is set to 0
, the file processing job will effectively be disabled and not run, even if Enabled
is set to true
.
Cleaning Settings
The Cleaning subsection is used by the BAM database cleaning job.
Property | Description | Default Value |
---|---|---|
Enabled | Enables or disabled the cleaning job. To enable set to true , or disable to false . |
false |
CleaningTime | Start time of the cleaning job. Defined in 24 hour format "hh:mm:ss" (hh = hour, mm = minutes, ss = seconds). | 23:30:00 (11:30pm) |
DaysToKeep | Determines how many days of log data are kept in the database. | 15 |
MaximumLogDataSizeGByte | States how much log data, in GBytes, should be kept in the database. | 10 |
For the CleaningTime property it is necessary to add leading zeros when needed. Some examples:
15:45:00
: the job is scheduled to run at 3:45pm.02:00:00
: cleaning is scheduled at 2:00am.
Defining a value of 0
or 0.0
to MaximumLogDataSizeGByte will effectively disable the removal of data to size.
Maintenance
The settings for the database maintenance job are set in the subsection Maintenance.
Property | Description | Default Value |
---|---|---|
Enabled | Enables or disabled the maintenance actions during cleaning. To enable set to true , or disable to false . Also see Note. |
false |
MaintenanceDay | Defines the day of the week on which the maintenance actions must be executed. | Sunday |
UpdateStats | Enables or disables the updating of table statistics. | false |
UpdateIndexes | Selects whether any indexes must be rebuilt (Rebuild ), reorganised (Reorganize ) or not at all (None ). |
None |
DatabaseShrinking | Allows for shrinking the database files themselves when they contain a lot of free space. | false |
Note
Setting the Enabled property to true
will only run the maintenance task when the same property Enabled
of the
cleaning task is also set to true
.
If the cleaning task is not enabled, the maintenance job won't run either.
All possible values of the property MaintenanceDay are:
Monday
Tuesday
Wednesday
Thursday
Friday
Saturday
Sunday
Fallback Configuration
When no section LogProcessing
can be found, the BAM service will fallback to specific default settings. Those settings are:
- OperatingMode:
Fixed
- FileProcessing:
- Enabled:
true
- IntervalTimeMinutes:
1
- Enabled:
- Cleaning:
- Enabled:
true
- CleaningTime:
"23:30:00"
- DaysToKeep:
15
- MaximumLogDataSizeGByte:
10
- Enabled:
- Maintenance:
- Enabled:
false
- other settings are ignored
- Enabled:
The settings within AdaptiveCpuBoundaries are ignored because the OperatingMode is set to Fixed
.