Configuration

The service allowed two variant of configuration:

  1. use the Configurator service
  2. use the configuration file

The service reads settings from the configuration file by default.

You can specify the –luna-config option for pulling settings from the Configurator service, see configurator.

Auto reload configuration

The service supports an auto-reload of configurations. You can enable this feature by specifying a config-reload option in the command line. The service periodically checks new settings. If current settings and new pulled settings are the same the service will not perform any actions. You can specify the check period in the pulling-time command line argument (10 seconds by default).

If a configuration fetching has failed, the service will work without applying any changes to the existing configurations.

If check connections with the new configuration have failed, the service will retry pulling new configuration after pulling-time seconds. The service will shut down after 10 failed attempts.

Warning

Service can work incorrectly while the new settings are being applied. It is strongly recommended not to send requests to the service when you change important settings (redis settings, work plugins list and others).

During configuration reload any existing HTTP connections to the service will be closed.

Configuration file for administrator

# Luna-backport4 configuration file

[LUNA_CONFIGURATOR]
#: load configs from configurator
USE_CONFIGURATOR = 0
#: luna-configurator origin
LUNA_CONFIGURATOR_ORIGIN = http://127.0.0.1:5070
#: luna-configurator api version
LUNA_CONFIGURATOR_API  = 1


[INFLUX_MONITORING]

#: send data for monitoring to influxdb
SEND_DATA_FOR_MONITORING = 0
#: [integer] InfluxDB version (1 for InfluxDB 1.x, or 2 for InfluxDB 2.x)
VERSION = 2
#: [string] InfluxDB 2.x workspace
ORGANIZATION =
#: [string] InfluxDB 2.x authentication token
TOKEN =
#: [string] InfluxDB 2.x bucket name
BUCKET = luna_monitoring
#: ip-address of the influxdb
HOST = 127.0.0.1
#: port of the influxdb
PORT = 8086
#: if https should be used for connection to the influxdb (0 - not use , otherwise yes)
USE_SSL = 0
#: frequency of sending monitoring data to influx (in seconds)
FLUSHING_PERIOD = 1


[LUNA_BACKPORT4_LOGGER]

#: folder, where logs are saved
FOLDER_WITH_LOGS = ./
#: level of debug print, by priority: ERROR, WARNING, INFO, DEBUG
LOG_LEVEL = INFO
#: time for records in logs: LOCAL or UTC
LOG_TIME = LOCAL
#: Maximum log file size in megabytes for rotation (0 - without rotation)
MAX_LOG_FILE_SIZE = 1024


[LUNA_API_ADDRESS]

#: LUNA API origin
ORIGIN = http://127.0.0.1:5000
#: LUNA API api version
API_VERSION = 6


[LUNA_API_TIMEOUTS]

#: CONNECT TIMEOUT
CONNECT = 30
#: REQUEST TIMEOUT (total)
REQUEST =  60

[LUNA_FACES_ADDRESS]

#: LUNA Faces origin
ORIGIN = http://127.0.0.1:5030
#: LUNA Faces api version
API_VERSION = 3


[LUNA_FACES_TIMEOUTS]

#: CONNECT TIMEOUT
CONNECT = 30
#: REQUEST TIMEOUT (total)
REQUEST =  60


[ATTRIBUTES_STORAGE_POLICY]
#: [integer] maximum time to live for temporary attributes (in seconds), default: 1 day
MAX_TTL = 86400

[OTHER]

#: [string] list active plugins
LUNA_BACKPORT4_ACTIVE_PLUGINS = []

[LUNA_SENDER_ADDRESS]
#: LUNA Sender origin
ORIGIN = http://127.0.0.1:5080
#: LUNA Sender api version
API_VERSION = 2


[ADDITIONAL_SERVICES_USAGE]
#: [integer] whether to use LUNA Sender
LUNA_SENDER = 0

Extended administrator configuration

Module parses a config file and sets values in the global variables.

configs.config.MAX_LIMIT_FOR_MATCHING = 100

maximum limit for matching

configs.config.MAX_MATCHING_LIMIT = 100

maximum allowed matching limit parameter value