Configuration¶
The service allowed two variant of configuration:
use the Configurator service
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 (database credentials, work plugins list, and others).
Configuration file for administrator¶
# LUNA video manager configuration file
[LUNA_CONFIGURATOR]
#: [integer] load configs from LUNA Configurator
USE_CONFIGURATOR = 0
#: [string] LUNA Configurator protocol, IP address, and port
LUNA_CONFIGURATOR_ORIGIN = http://127.0.0.1:5070
#: [integer] API version of the LUNA Configurator
LUNA_CONFIGURATOR_API = 1
[LUNA_VIDEO_MANAGER_DB]
#: [string] type of database: "postgres" or "oracle"; "postgres" type is used by default
DB_TYPE = postgres
#: [string] database username
DB_USER = luna
#: [string] database password
DB_PASSWORD = luna
#: [string] database IP address
DB_HOST = 127.0.0.1
#: [integer] database listener port, 5432 - default for "postgres" type, 1521 - default for "oracle" type
DB_PORT = 5432
#: [string] database name for "postgres" type, SID name for "oracle" type
DB_NAME = luna_video_manager
[LUNA_LAMBDA_DB.DB_SETTINGS]
#: [integer] database connection pool size
CONNECTION_POOL_SIZE = 5
[LUNA_VIDEO_MANAGER_LOGGER]
#: [string] folder, where logs are saved (relative path begins in directory with application)
FOLDER_WITH_LOGS = ./
#: [string] level of debug print, by priority: "ERROR", "WARNING", "INFO", "DEBUG"
LOG_LEVEL = INFO
#: [string] time format used in log records: "LOCAL" or "UTC"
LOG_TIME = LOCAL
#: [integer] maximum log file size in megabytes before performing rotation (0 - without rotation)
MAX_LOG_FILE_SIZE = 1024
#: send log to stdout
LOG_TO_STDOUT = 1
#: send log to file
LOG_TO_FILE = 0
#: allow multiline stack trace in logs
MULTILINE_STACK_TRACE = 1
#: log format
FORMAT = default
[LUNA_STREAMS_RETRANSLATOR_ADDRESS]
#: [string] LUNA Streams Retranslator protocol, IP address, and port
ORIGIN = http://127.0.0.1:5250
#: [integer] API version of the LUNA Faces
API_VERSION = 1
[LUNA_STREAMS_RETRANSLATOR_TIMEOUTS]
#: [integer] HTTP connection timeout
CONNECT = 30
#: [integer] HTTP request timeout (total)
REQUEST = 60
[ADDITIONAL_SERVICES_USAGE]
#: [integer] send events to LUNA Events for storing
LUNA_EVENTS = 1
#: [integer] use LUNA Tasks
LUNA_TASKS = 1
#: [integer] use LUNA Python Matcher Proxy instead of LUNA Python Matcher
LUNA_MATCHER_PROXY = 1
#: [integer] use LUNA Sender
LUNA_SENDER = 1
#: [integer] use LUNA Image Store
LUNA_IMAGE_STORE = 1
#: [integer] use LUNA Handlers
LUNA_HANDLERS = 1
#: [integer] use LUNA Video Manager
LUNA_VIDEO_MANAGER = 1
#: [integer] use LUNA Video Agent
LUNA_VIDEO_AGENT = 1
#: [integer] support LUNA STREAMS RETRANSLATOR service
LUNA_STREAMS_RETRANSLATOR = 1
[LUNA_MONITORING]
#: [string] storage type
STORAGE_TYPE = influx
#: [integer] send data for monitoring to InfluxDB
SEND_DATA_FOR_MONITORING = 0
#: [string] InfluxDB 2.x workspace
ORGANIZATION = luna
#: [string] InfluxDB 2.x authentication token
TOKEN = kofqt4Pfqjn6o0RBtMDQqVoJLgHoxxDUmmhiAZ7JS6VmEnrqZXQhxDhad8AX9tmiJH6CjM7Y1U8p5eSEocGzIA==
#: [string] InfluxDB 2.x bucket name
BUCKET = luna_monitoring
#: [string] InfluxDB IP address
HOST = 127.0.0.1
#: [integer] InfluxDB port
PORT = 8086
#: [integer] use HTTPS to connect to InfluxDB
USE_SSL = 0
#: [integer] frequency of sending monitoring data to InfluxDB (in seconds)
FLUSHING_PERIOD = 1
[LUNA_VIDEO_MANAGER_HTTP_SETTINGS]
#: web server http settings
#: [integer] service request timeout (in seconds)
REQUEST_TIMEOUT = 60
#: [integer] service response timeout (in seconds)
RESPONSE_TIMEOUT = 600
#: [integer] max request size (in bytes), default 1gb
REQUEST_MAX_SIZE = 1073741824
#: [integer] service http keep-alive timeout (in seconds)
KEEP_ALIVE_TIMEOUT = 15
[LUNA_LICENSES_ADDRESS]
#: LUNA Faces protocol, IP address, and port
ORIGIN = http://127.0.0.1:5120
#: API version of the LUNA Faces
API_VERSION = 1
[LUNA_SERVICE_METRICS]
#: [int] whether to enable /metrics path and statistics collection
ENABLED = 0
# [string] statistics data format (prometheus is the only option yet)
METRICS_FORMAT = prometheus
#: [dict] Extra labels for request and error metrics
[EXTERNAL_LUNA_STREAMS_HLS_RETRANSMISSION_ADDRESS]
#: [str] streams hls retransmission host
HOST = http://127.0.0.1
#: [int] streams hls retransmission port
PORT = 8888
[LUNA_SERVICE_METRICS.EXTRA_LABELS]
[OTHER]
#: [int] Agent status checker obsoleting interval in seconds in range (0, 86400]
LUNA_VIDEO_MANAGER_AGENT_STATUS_OBSOLETING_INTERVAL = 10
#: [int] Agent status checker obsoleting period in seconds in range (0, 86400]
LUNA_VIDEO_MANAGER_AGENT_STATUS_OBSOLETING_PERIOD = 60
#: [int] Stream status checker obsoleting interval in seconds in range (0, 86400]
LUNA_VIDEO_MANAGER_STREAM_STATUS_OBSOLETING_INTERVAL = 5
#: [int] Stream status checker obsoleting period in seconds in range (0, 86400]
LUNA_VIDEO_MANAGER_STREAM_STATUS_OBSOLETING_PERIOD = 20
#: [int] Stream autorestarter execution interval in seconds in range (0, 86400]
LUNA_VIDEO_MANAGER_STREAMS_AUTORESTARTER_INTERVAL = 5
#: [int] Stream distribution execution interval in seconds in range (0, 86400]
LUNA_VIDEO_MANAGER_STREAMS_AGENT_SEARCH_INTERVAL = 5
#: storage time - "LOCAL" or "UTC"
STORAGE_TIME = LOCAL
#: list of active plugins
LUNA_VIDEO_MANAGER_ACTIVE_PLUGINS = []
Extended administrator configuration¶
Module contains constants.
- configs.config.AGENT_DOWNGRADE_INTERVAL = 10¶
agent downgrade execution interval
- configs.config.DB_CONNECT_TIMEOUT = 5¶
Connection timeout for database in seconds
- configs.config.DEFAULT_PORT = 5230¶
Default port
- configs.config.MASTER_HEARTBEAT_INTERVAL = 1¶
master luna-video-manager instance heartbeat interval
- configs.config.MAX_ARRAY_LEN_FILTERS = 1000¶
Max length for array filters in incoming jsons
- configs.config.STREAM_AUTORESTARTER_INTERVAL = 5¶
stream autorestarter execution interval
- configs.config.STREAM_DOWNGRADE_INTERVAL = 5¶
stream downgrade execution interval