MetaDefender Configuration
Linux
The configuration file for the server is located in /etc/ometascan/ometascan.conf
After modifying the server configuration file you must restart the Metadefender Core service in order for the changes to take effect. You should use the distribution-standard way to restart the service.
[global] section
parameter | default value | required | description |
---|---|---|---|
restaddress | * | required | IP address of the computer that runs MetaDefender Core to serve REST API and web user interface (* means listening from all interfaces including IP version 4 and 6). Just in case IP version 6 is not enabled on the system, then changing it to |
restport | 8008 | required | Designated port number for the web management console and REST interface |
report_engine_issue | true | optional | Enable reporting of engine issue count. (possible values: "true" or "false") |
dlppath | [Data directory]/dlp | optional | Directory for DLP-processed database and items |
quarantinepath | [Data directory]/quarantine | optional | Directory for quarantine database and quarantined items |
sanitizepath | [Data directory]/sanitized | optional | Directory for sanitized database and sanitized items |
dbmode | 1 | optional | Support database mode, possible values:
After changed, a Core service restart is required to take effect. Only available starting MetaDefender Core 4.19.2 |
tempdirectory | optional | Full path of a directory to use for storing temporary files rather than using their default directories: Users need to prepare this directory in advance. MetaDefender Core creates a subfolder called Default: | |
tempdirectory_create_timeout | optional | Maximum time allowed for MetaDefender Core to access device and create temporary folder on it. |
[logger] section
key | default value | required | description |
---|---|---|---|
logfile | /var/log/ometascan/ometascan.log | optional | Full path of a logfile to write log messages to |
loglevel | info | optional | Level of logging. Supported values are: debug, info, warning, error |
log_rotation | 1 | optional | Should only set this key when logfile key is also set accordingly. Supported values:
|
syslog | optional | Switch on logging to a local ('local') or remote ('protocol://<hostname>:<port>') syslog server (Multiple server can be specified separated with comma). More details: HERE | |
syslog_level | optional | Level of logging. Supported values are: debug, info, warning, error | |
local_timezone | false | optional | Set local timezone for events sending to local syslog server |
override | optional | Override specific log ids to display them on another level e.g.: "1723:error,663:info" If there is no level set for an id, it will be displayed on every occasion. e.g.: "1723,663:info" means id 1723 dump message will be displayed every time and id 663 warning message is reduced to info level. | |
cef | false | optional | If true, the log format is Common Event Format. |
nginx_logfile | /var/log/ometascan/nginx-ometascan.log | optional | File name and path to store the NGINX logs. If this value is changed, the /etc/logrotate.d/ometascan should be changed accordingly. |
Setting both syslog
and syslog_level
, or none of them.
Setting both logfile
and loglevel
, or none of them.
[internal] section
key | default value | required | description |
---|---|---|---|
db_connection | 10 | optional | Define maximum number of concurrent connections allows MetaDefender Core to open to work with PostgreSQL database server. Only available starting MetaDefender Core 4.19.1 |
data_directory | /var/lib/ometascan | optional | Full path for MD Core’s data (database, updates etc.) E.g. /var/lib/ometascan/test |
skip_upgrade_scan_data | 0 | optional | When enabled (set to 1), upgrading MetaDefender Core will auto skip migrating history processing data which is usually big in size (only migrate configurations and audit history). This setting is to save upgrade time when users do not need to migrate entire scan data. |
parallelcount | 20 | optional | Set maximum number of threads (files) sending to engine at the same time, applicable to all engines Exception:
|
parallelcount_<enginename> | optional |
For example: engine id: Some common use-cases:
| |
next_extraction_polling_interval | 1000 | optional | Fine-tuning this interval between the range of 100-200ms may help stabilize the performance and processing time when dealing with small archive files or office document files under high load. In case this polling interval is set to out of range (invalid number, < 100, or > 1000), the application cannot start, and an exception will log to system event log. |
Windows
The configuration for the server is located in Windows Registry: HKEY_LOCAL_MACHINE\SOFTWARE\OPSWAT\Metascan\
After modifying the server configuration file you must restart the MetaDefender Core service in order for the changes to take effect.
Global
HKEY_LOCAL_MACHINE\SOFTWARE\OPSWAT\Metascan\global
parameter | default value | type | required | description |
---|---|---|---|---|
restaddress | * | string value | required | IP address of the computer that runs MetaDefender Core to serve REST API and web user interface (* means listening from all interfaces including IP version 4 and 6). Just in case IP version 6 is not enabled on the system, then changing it to |
restport | 8008 | string value | required | Designated port number for the web and REST interface |
report_engine_issue | true | string value | optional | Enable reporting of engine issue count. (possible values: "true" or "false"). |
dlppath | [installdir]\data\dlp | string value | optional | Directory for DLP-processed database and items |
quarantinepath | [installdir]\data\quarantine | string value | optional | Directory for quarantine database and quarantined items |
sanitizepath | [installdir]\data\sanitized | string value | optional | Directory for sanitized database and sanitized items |
dbmode | 1 | string value | optional | Support database mode, possible values:
After changed, a Core service restart is required to take effect. Only available starting MetaDefender Core 4.19.2 |
tempdirectory | string value | optional | Full path of a directory to use for storing temporary files. Users need to prepare this directory in advance. MetaDefender Core creates a subfolder called Default: | |
tempdirectory_create_timeout | string value | optional | Maximum time allowed for MetaDefender Core to access device and create temporary folder on it. |
Logger
HKEY_LOCAL_MACHINE\SOFTWARE\OPSWAT\Metascan\logger
key | default value | type | required | description |
---|---|---|---|---|
logfile | string value | optional | Location of a logfile to write log messages to. | |
loglevel | string value | optional | Level of logging. Supported values are: debug, info, warning, error. Must set value on this key when logfile key is also set accordingly. | |
log_rotation | 1 | string value | optional | This setting is only applicable on Windows only (on Linux, we use built-in OS log rotation). Should only set this key when logfile key is also set accordingly. Supported values:
|
wineventlog_level | info | string value | optional | Level of logging. Supported values are: debug, info, warning, error. |
syslog | string value | optional | Value can only by in form of 'protocol://<hostname>:<port>' (Multiple server can be specified separated with comma). More details: HERE | |
syslog_level | string value | optional | Level of logging. Supported values are: debug, info, warning, error. Must set value on this key when syslog key is also set accordingly. | |
local_timezone | false | string value | optional | Set local timezone for events sending to local syslog server. |
override | string value | optional | Override specific log ids to display them on another level e.g.: "1723:error,663:info". If there is no level set for an id, it will be displayed on every occasion. e.g.: "1723,663:info" means id 1723 dump message will be displayed every time and id 663 warning message is reduced to info level. | |
cef | false | string value | optional | If true, the log format is Common Event Format. |
nginx_logfile | [installdir] ginx ginx.log | string value | optional | File name and path to store the NGINX logs. |
nginx_log_rotation | 1 | string value | optional | This setting is only applicable on Windows only (on Linux, we use built-in OS log rotation). Should only set this key when nginx_logfile key is also set accordingly. Supported values:
|
Setting both syslog
and syslog_level
, or none of them.
Setting both logfile
and loglevel
, or none of them.
Internal
HKEY_LOCAL_MACHINE\SOFTWARE\OPSWAT\Metascan\internal
key | default value | type | required | description |
---|---|---|---|---|
db_connection | 10 | string value | optional | Define maximum number of concurrent connections allows MetaDefender Core to open to work with PostgreSQL database server. Only available since MetaDefender Core 4.19.1 |
data_directory | <MD Core installation folder>\data | string value | optional | Full path for MD Core’s data (database, updates etc.) E.g. D:\custom_path |
skip_upgrade_scan_data | 0 | string value | optional | When enabled (set to 1), upgrading MetaDefender Core will auto skip migrating history processing data which is usually big in size (only migrate configurations and audit history). This setting is to save upgrade time when users do not need to migrate entire scan data. |
parallelcount | 20 | string value | optional | Set maximum number of threads (files) sending to engine at the same time, applicable to all engines Exception:
|
parallelcount_<enginename> | string value | optional |
For example: engine id: Some common use-cases:
| |
next_extraction_polling_interval | 1000 | string value | optional | Fine-tuning this interval between the range of 100-200ms may help stabilize the performance and processing time when dealing with small archive files or office document files under high load. In case this polling interval is set to out of range (invalid number, < 100, or > 1000), the application cannot start, and an exception will log to system event log. |