Skip to content

Configuration file

This is the default mfbus 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 retention (in days)
retention=5

# 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 json_file is @@@MFMODULE_RUNTIME_HOME@@@/log/json_logs.log
#         if [admin]/hostname != null else null (desactivated)
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

# 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


####################################
##### JSONSYSLOG2ELASTICSEARCH #####
####################################
[jsonsyslog2elasticsearch]


# UDP port used by jsonsyslog2elasticsearch syslog server (for mflog logs)
mflog_port = 0


########################
##### 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)
elasticsearch_http_port=15603



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


#################
##### NGINX #####
#################
[nginx]

# If flag=0, do not start nginx (can be useful in very special use cases)
flag=1

# Port of nginx daemon
# IMPORTANT: this is the main port of the mfserv module
# Note: as metwork does not run as root user, you CAN'T use here a value < 1024
port=12568

# Max body size for incoming http requests (in MB)
upload_max_body_size=100

# Number of nginx workers
# (the {{MFHARDWARE_NUMBER_OF_CPU_CORES_MULTIPLIED_BY_2}} special values
#  is probably a good start)
workers={{MFHARDWARE_NUMBER_OF_CPU_CORES_MULTIPLIED_BY_2}}

# Default timeout (in seconds)
# You can override this in plugin config.ini
timeout=60

# If logging=0, do not log anything in nginx_access.log
logging=1

# In which tmp directory nginx put big request bodies
clientbody_temp_path=@@@MFMODULE_RUNTIME_HOME@@@/var/nginx2

# If add_request_id_header=1 (default), we add the "X-Request-Id" header in
# the response to the client
add_request_id_header=1

# If accept_incoming_request_id_header=1, accept incoming X-Request-Id as
# request_id and don't generate a new one (in this case)
accept_incoming_request_id_header=0

# Advanced settings
# Determines whether the connection with a plugin should be
# closed when a client closes the connection without waiting for a response.
# See: <http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_ignore_client_abort>
proxy_ignore_client_abort=1

# If your mfserv is behind a reverse proxy, you will loose the real client ip
# in your logs. With these advanced parameters, you can configure
# http://nginx.org/en/docs/http/ngx_http_realip_module.html nginx module
# (set to 1 to activate)
real_ip=0

# see http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_recursive
# (1 => on, 0 => off)
real_ip_recursive=1

# Defines the request header field whose value will be used to replace
# the client address.
# see http://nginx.org/en/docs/http/ngx_http_realip_module.html#real_ip_header
real_ip_header=X-Forwarded-For

# Coma separated trusted addresses that are known to send correct replacement
# addresses.
# See http://nginx.org/en/docs/http/ngx_http_realip_module.html#set_real_ip_from
# (null value means no trusted addresses)
real_ip_set_from=172.16.0.0/12,192.168.0.0/16,10.0.0.0/8

# Enables or disables emitting nginx version on error pages and
# in the "Server" response header field.
# (1 => enabled, 0 => disabled)
server_tokens=1

# If >0, override the global setting [log]/max_size_before_rotation
# for the nginx daemon (only)
max_size_before_rotation=-1

# Port of nginx daemon in SSL mode
# Note: as metwork does not run as root user, you CAN'T use here a value < 1024
# (null => no https support)
# If you set a value here, you have also to set ssl_certificate and
# ssl_certificate_key keys
https_port=null

# SSL certificate (full path)
# See http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_certificate
ssl_certificate=/dev/null

# SSL certificate secret key (full path)
# See http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_certificate
ssl_certificate_key=/dev/null

# http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_ciphers
# (don't change this unless you are a SSL guru)
ssl_ciphers=HIGH:!aNULL:!MD5

# http://nginx.org/en/docs/http/ngx_http_ssl_module.html#ssl_protocols
# (don't change this unless you are a SSL guru)
ssl_protocols=TLSv1 TLSv1.1 TLSv1.2


##################
##### CIRCUS #####
##################
[circus]

# You probably don't want to change anything in this section
endpoint=ipc://{{MFMODULE_RUNTIME_HOME}}/var/circus.socket
pubsub_endpoint=ipc://{{MFMODULE_RUNTIME_HOME}}/var/circus_pubsub.socket

####################
##### RABBITMQ #####
####################
[rabbitmq]

# If flag=0, do not start rabbitmq (can be useful in some cases)
flag=1

# Port AMQP of rabbitmq-server.
amqp_port=5672

# Internal port of rabbitmq-server.
dist_port=25672

# Port of management plugin
management_port=15672

# Port of epmd (erlang) daemon
epmd_port=4369

####################
##### TELEGRAF #####
####################
[telegraf]

# Telegraf statsd port (on this host)
# Change this if it's already used
statsd_port=18130

# if debug=1, put telegraf in trace mode (WARNING: produce a lot of logs)
debug=0


###############
##### TBS #####
###############
[tbs]

default_lifetime=3600
max_lifetime=3600
max_namespace_size=10000000000
max_namespace_size_in_bytes=10000000000
max_blob_size=10000000000
storage_dir={{MFMODULE_RUNTIME_HOME}}/var/tbs