Skip to content

Configuration Reference

This reference documents all configuration options for License Monitor’s TOML configuration file.

Default locations (in priority order):

  1. Path specified by --config argument
  2. LICENSE_MONITOR_CONFIG environment variable
  3. ./config.toml (current directory)
  4. /etc/license-monitor/config.toml
# License Monitor Configuration File
# All options with their default values
[command_mode]
command = "lmstat -a"
interval_seconds = 300
timeout_seconds = 120
parse_script = ""
working_directory = ""
[tail_mode]
log_file = ""
regex_pattern = ""
batch_size = 10
follow = true
[api]
enabled = true
bind_address = "127.0.0.1"
bind_port = 8080
allow_public_bind = false
api_key = ""
require_auth = false
rate_limit_enabled = true
rate_limit_requests = 60
rate_limit_window_seconds = 60
cors_enabled = false
cors_origins = []
cors_methods = ["GET", "POST", "OPTIONS"]
cors_headers = ["Content-Type", "X-API-Key"]
cors_max_age = 86400
cors_credentials = false
max_connections = 100
read_timeout_seconds = 30
write_timeout_seconds = 30
idle_timeout_seconds = 60
[daemon]
log_file = "logs/license_monitor.log"
log_level = "warn"
console_log_level = ""
file_log_level = ""
otel_log_level = ""
log_format = "text"
[update]
channel = "stable"
auto_check = false
require_signature = true
endpoint = "https://api.github.com"
owner = ""
repo = ""
mirror_url = ""
telemetry = false

Controls periodic command execution.

[command_mode]
OptionTypeDefaultDescription
commandstring""Command to execute
interval_secondsinteger300Execution interval (seconds)
timeout_secondsinteger120Command timeout (seconds)
parse_scriptstring""Python script for output parsing
working_directorystring""Working directory for command
[command_mode]
# Basic FlexLM query
command = "lmstat -a -c 27000@license-server"
interval_seconds = 300
# With parse script
command = "lmstat -a"
parse_script = "/etc/license-monitor/servers/flexlm/parse.py"
# RLM with longer timeout
command = "rlmstat -a -c 5053@rlm-server"
timeout_seconds = 180

Controls log file monitoring.

[tail_mode]
OptionTypeDefaultDescription
log_filestring""Path to log file to monitor
regex_patternstring""Regex for parsing log entries
batch_sizeinteger10Number of lines to process per batch
followbooleantrueContinue monitoring for new lines
[tail_mode]
log_file = "/var/log/flexlm/lmstat.log"
regex_pattern = "^(\\d{4}/\\d{2}/\\d{2} \\d{2}:\\d{2}:\\d{2})\\s+(\\w+)\\s+(.*)$"
batch_size = 50
follow = true

Controls the web API server.

[api]
OptionTypeDefaultDescription
enabledbooleantrueEnable API server
bind_addressstring”127.0.0.1”IP address to bind
bind_portinteger8080Port to bind
allow_public_bindbooleanfalseAllow binding to 0.0.0.0
max_connectionsinteger100Maximum concurrent connections
OptionTypeDefaultDescription
api_keystring""API key for authentication
require_authbooleanfalseRequire authentication
OptionTypeDefaultDescription
read_timeout_secondsinteger30Request read timeout
write_timeout_secondsinteger30Response write timeout
idle_timeout_secondsinteger60Idle connection timeout
OptionTypeDefaultDescription
rate_limit_enabledbooleantrueEnable rate limiting
rate_limit_requestsinteger60Requests per window
rate_limit_window_secondsinteger60Rate limit window
OptionTypeDefaultDescription
cors_enabledbooleanfalseEnable CORS
cors_originsarray[]Allowed origins
cors_methodsarray[“GET”,“POST”,“OPTIONS”]Allowed methods
cors_headersarray[“Content-Type”,“X-API-Key”]Allowed headers
cors_max_ageinteger86400Preflight cache duration
cors_credentialsbooleanfalseAllow credentials
[api]
enabled = true
bind_address = "127.0.0.1"
bind_port = 8080
require_auth = false
rate_limit_enabled = false

Controls logging and output.

[daemon]
OptionTypeDefaultDescription
log_filestring”logs/license_monitor.log”Log file path
log_levelstring”warn”Default log level
console_log_levelstring""Console-specific level
file_log_levelstring""File-specific level
otel_log_levelstring""OpenTelemetry level
log_formatstring”text”Log format: text or json
LevelDescription
errorErrors only
warnWarnings and above
infoInformational and above
debugDebug and above
traceAll messages
[daemon]
log_file = "/var/log/license-monitor/license_monitor.log"
log_level = "warn"
# JSON format for log aggregation
log_format = "json"
# Different levels per output
console_log_level = "info"
file_log_level = "debug"
otel_log_level = "warn"

Controls the self-update system.

[update]
OptionTypeDefaultDescription
channelstring”stable”Update channel: stable or beta
auto_checkbooleanfalseEnable automatic update checks
require_signaturebooleantrueRequire SHA-256 verification
endpointstringhttps://api.github.comGitHub API endpoint
ownerstring""Repository owner
repostring""Repository name
mirror_urlstring""Optional download mirror
telemetrybooleanfalseEnable local update telemetry
[update]
channel = "stable"
auto_check = false
require_signature = true
owner = "keithce"
repo = "license_monitor"
# For private repos
# Set GITHUB_TOKEN environment variable
# For air-gapped environments
mirror_url = "https://internal-mirror.example.com/releases"

Configuration values can reference environment variables:

[api]
api_key = "${LICENSE_MONITOR_API_KEY}"
bind_address = "${LICENSE_MONITOR_HOST:-127.0.0.1}"
bind_port = "${LICENSE_MONITOR_PORT:-8080}"

Syntax:

  • ${VAR} - Required variable
  • ${VAR:-default} - Variable with default value

Validate configuration before deployment:

Terminal window
license_monitor --config config.toml --validate