Skip to content

Configuration file

This is the default mfdata configuration file.

###################
##### STARTUP #####
###################
[startup]

# If flag=0, block the start of the module
flag=1


#######################
##### AUTORESTART #####
#######################
[autorestart]

# If flag=1, then the autorestart feature is on
flag=1


################
##### MISC #####
################
[misc]

# Max coredumps size (value for `ulimit -c`;
# if core_size=-1, `ulimit -c` is not set)
core_size=0

# tmp sub-directory (${MFMODULE_RUNTIME_HOME}/tmp) cleaning
# 0 => no automatic cleaning
# x => clean files/directories older than x days
tmp_max_age=2


###############
##### LOG #####
###############
[log]

# Log minimal level
#  DEBUG => everything,
#  INFO => everything but not DEBUG,
#  WARNING => everything but not DEBUG and INFO,
#  ERROR => everything but not DEBUG, INFO and WARNING,
#  CRITICAL => everything but not DEBUG, INFO, WARNING AND ERROR
minimal_level=INFO

# Duplicate some log messages in JSON to a specific file (for external
# monitoring tool)
# If json_file value is :
# null => the feature is desactivated
# AUTO => the feature is desactivated (because it's not necessary anymore
#         since 1.2 version)
json_file=null

# Minimal level for this json log file
#  DEBUG => everything,
#  INFO => everything but not DEBUG,
#  WARNING => everything but not DEBUG and INFO,
#  ERROR => everything but not DEBUG, INFO and WARNING,
#  CRITICAL => everything but not DEBUG, INFO, WARNING AND ERROR
# Note: you can't send more messages to json log file than the configured global
#       minimal_level level (so also change the value of minimal_level key in
#       these uncommon use-cases)
json_minimal_level=WARNING

# Send some log files to mfadmin
# null => the feature is desactivated
# AUTO => the feature is activated if [admin]/hostname != null
mfadmin_flag=AUTO

# Minimal level for mfadmin send
#  DEBUG => everything,
#  INFO => everything but not DEBUG,
#  WARNING => everything but not DEBUG and INFO,
#  ERROR => everything but not DEBUG, INFO and WARNING,
#  CRITICAL => everything but not DEBUG, INFO, WARNING AND ERROR
# Note: you can't send more messages to mfadmin than the configured global
#       minimal_level level (so also change the value of minimal_level key in
#       these uncommon use-cases)
mfadmin_minimal_level=WARNING

# Maximum number of rotated files to keep
number_of_rotated_files=5

# Max age of a log file before rotation (in seconds)
# Default: 86400 (24H)
max_age_before_rotation=86400

# Max size of a log file before rotation (in bytes)
# Default: 104857600 (100 MB)
max_size_before_rotation=104857600

# chmod on log files
# Default : 0644
chmod=0644

# Try to split stdout/stderr in distinct log files (when it's possible)
# (1 => split, 0 => don't split)
try_to_split_stdout_stderr=0

# Try to split multiple workers in distinct log files (when it's possible)
# (1 => split, 0 => don't split)
try_to_split_multiple_workers=0


##################
##### VECTOR #####
##################
[vector]


# UDP port used by vector syslog server (for mflog logs)
mflog_port = 5150

# UDP port used by vector syslog server (for nginx logs)
nginxlog_port = 5151


########################
##### ADMIN MODULE #####
########################
[admin]

# Hostname hosting the mfadmin module (if any)
# null => no monitoring
# localhost => send logs and metrics to the locally installed mfadmin module
# * => send logs and metrics to the specified host (which must host an mfadmin
#      module)

hostname=null


# Influxdb HTTP port on mfadmin host
# (change this only if you changed influxdb http port on mfadmin host)
influxdb_http_port=18086

# ElasticSearch HTTP port on mfadmin host
# (change this only if you changed elasticsearch http port on mfadmin host)
# (0 => no elasticsearch usage)
elasticsearch_http_port=15603

# Loki HTTP port on mfadmin host
# (change this only if you changed loki http port on mfadmin host)
# (0 => no loki usage)
# (13600 => default loki http port on mfadmin)
loki_http_port=0


# If send_nginx_logs=1, send nginx access logs to the configured admin hostname
send_nginx_logs=1


# If send_mflog_logs=1, send mflog logs to the configured admin hostname
send_mflog_logs=1


###################
##### DATA IN #####
###################
[data_in]
# Data preprocessing root (without / at the end)
dir={{MFMODULE_RUNTIME_HOME}}/var/in

# Max lifetime for a file in trash subdir (in minutes)
trash_max_lifetime=1440

# Max lifetime for a file in tmp subdir (in minutes)
tmp_max_lifetime=60

# Max lifetime for a file in data_in_dir but
# not in trash or tmp subdir (in minutes)
other_max_lifetime=360


##################
##### CIRCUS #####
##################
[circus]
endpoint = ipc://@@@MFMODULE_RUNTIME_HOME@@@/var/circus.socket
pubsub_endpoint = ipc://@@@MFMODULE_RUNTIME_HOME@@@/var/circus_pubsub.socket


##############################
##### DIRECTORY OBSERVER #####
##############################
[directory_observer]
# inactivity timeout : if no event are received after this timeout (in seconds)
# a CRITICAL message is logged and the programe is restarted
# 0 => no timeout
monitor_inactivitytimeout=300

# forced poll (advanced configuration option)
forced_poll=300

# poll queue limit (advanced configuration option)
poll_queue_limit=10000

# ignore default pattern (list separated by ';') specifying file name patterns
# to be ignored
ignore=^.*\.t$;^.*\.tmp$


#################
##### REDIS #####
#################
[redis]
# redis will listen on a unix socket
# but, if you set a value != 0 below, it will also listen this tcp port
port=0
max_memory=2048
pubsubclient_output_buffer_hard_limit = 1600
pubsubclient_output_buffer_soft_limit = 1200


#################
##### NGINX #####
#################
[nginx]
flag=1
# nginx will listen on a unix socket
# but, if you set a value != 0 below, it will also listen this tcp port
port=9091
upload_dir=@@@MFMODULE_RUNTIME_HOME@@@/var/in/incoming
clientbody_temp_path=@@@MFMODULE_RUNTIME_HOME@@@/var/in/tmp/nginx
# MB
upload_max_body_size=100
workers={{MFHARDWARE_NUMBER_OF_CPU_CORES_MULTIPLIED_BY_2}}
logging=1


############################
##### INTERNAL PLUGINS #####
############################
[internal_plugins]
# Install guess_file_type plugin (during module startup)
# 1 (default) => yes
# 0           => no
install_guess_file_type=1

# Install switch plugin (during module startup)
# 1 (default) => yes
# 0           => no
install_switch=1

# Number of worker processes for the switch plugin
# {{MFHARDWARE_...}} values are automatically computed
# (see corresponding env variables)
switch_numprocesses={{MFHARDWARE_NUMBER_OF_CPU_CORES_DIVIDED_BY_2}}

# Set debug mode only for the switch plugin
# (useless if you set the logging level to DEBUG globaly)
# 0 => no
# 1 => yes (can be really useful if you have some routing issues
#           as it will dump all tags and rules evaluation in logs)
switch_debug=0

# "no match" policy for the switch plugin:
# delete => we delete the file
# keep   => we keep the file in trash
switch_no_match_policy=delete

# Keep original basename in trash
# (applicable only if switch_no_match_policy=keep)
# 1 => yes
# 0 (default) => no
switch_no_match_keep_original_basename=0

# Number of worker processes for the guess_file_type plugin
# {{MFHARDWARE_...}} values are automatically computed
# (see corresponding env variables)
guess_file_type_numprocesses={{MFHARDWARE_NUMBER_OF_CPU_CORES_DIVIDED_BY_2}}

# Set debug mode only for the guess_file_type plugin
# (useless if you set the logging level to DEBUG globaly)
# 0 => no
# 1 => yes
guess_file_type_debug=0

# Coma separated list of directory names to watch
# (under ${MFDATA_DATA_IN_DIR}, default ${MFMODULE_RUNTIME_HOME}/var/in/)
#
# These directories will be watched by the guess_file_type plugin
# (if [internal_plugins]/install_guess_file_type=1)
# or directly by the switch plugin
# (if [internal_plugins]/install_guess_file_type=0 and
#     [internal_plugins]/install_swich=1)
#
# Note: if [internal_plugins]/install_guess_file_type=0 and
#          [internal_plugins]/install_swich=0, this parameter is useless
watched_directories=incoming


####################
##### TELEGRAF #####
####################
[telegraf]
statsd_port=18126
debug=0