Environment Variables
This reference documents all environment variables for both License Monitor and License Server Detail.
License Monitor
Section titled “License Monitor”Core Configuration
Section titled “Core Configuration”| Variable | Description | Default |
|---|---|---|
LICENSE_MONITOR_CONFIG | Path to configuration file | ./config.toml |
LICENSE_MONITOR_MODE | Operating mode | command |
LICENSE_MONITOR_LOG_LEVEL | Log level | warn |
API Server
Section titled “API Server”| Variable | Description | Default |
|---|---|---|
LICENSE_MONITOR_API_ENABLED | Enable API server | true |
LICENSE_MONITOR_BIND_ADDRESS | API bind address | 127.0.0.1 |
LICENSE_MONITOR_BIND_PORT | API bind port | 8080 |
ALLOW_PUBLIC_BIND | Allow 0.0.0.0 binding | false |
LICENSE_MONITOR_API_KEY | API authentication key | None |
| Variable | Description | Default |
|---|---|---|
LICENSE_MONITOR_CORS_ENABLED | Enable CORS | false |
LICENSE_MONITOR_CORS_ORIGINS | Allowed origins (comma-separated) | None |
Command Mode
Section titled “Command Mode”| Variable | Description | Default |
|---|---|---|
LICENSE_MONITOR_EXECUTE | Command to execute | None |
LICENSE_MONITOR_INTERVAL | Execution interval (seconds) | 300 |
LICENSE_MONITOR_TIMEOUT | Command timeout (seconds) | 120 |
Tail Mode
Section titled “Tail Mode”| Variable | Description | Default |
|---|---|---|
LICENSE_MONITOR_FILE | Log file to monitor | None |
LICENSE_MONITOR_REGEX | Regex pattern | None |
LICENSE_MONITOR_BATCH_SIZE | Batch processing size | 10 |
Logging
Section titled “Logging”| Variable | Description | Default |
|---|---|---|
LICENSE_MONITOR_LOG_FILE | Log file path | logs/license_monitor.log |
LICENSE_MONITOR_CONSOLE_LOG_LEVEL | Console log level | Same as main |
LICENSE_MONITOR_FILE_LOG_LEVEL | File log level | Same as main |
LICENSE_MONITOR_LOG_FORMAT | Log format (text/json) | text |
Update System
Section titled “Update System”| Variable | Description | Default |
|---|---|---|
LICENSE_MONITOR_UPDATE_CHANNEL | Update channel | stable |
LICENSE_MONITOR_UPDATE_OWNER | GitHub repo owner | None |
LICENSE_MONITOR_UPDATE_REPO | GitHub repo name | None |
GITHUB_TOKEN | GitHub token for private repos | None |
OpenTelemetry
Section titled “OpenTelemetry”| Variable | Description | Default |
|---|---|---|
OTEL_EXPORTER_OTLP_ENDPOINT | OTLP endpoint | None |
OTEL_EXPORTER_OTLP_METRICS_ENDPOINT | Metrics endpoint | None |
OTEL_EXPORTER_OTLP_LOGS_ENDPOINT | Logs endpoint | None |
OTEL_SERVICE_NAME | Service name | license_monitor |
License Server Detail
Section titled “License Server Detail”Public Variables (Client-Side)
Section titled “Public Variables (Client-Side)”| Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_API_BASE_URL | Backend API base URL | http://localhost:8080 |
NEXT_PUBLIC_API_TIMEOUT_MS | Request timeout (ms) | 10000 |
NEXT_PUBLIC_LOG_LEVEL | Client log level | debug (dev), info (prod) |
API Retry Configuration
Section titled “API Retry Configuration”| Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_API_RETRY_MAX_ATTEMPTS | Max retry attempts | 3 |
NEXT_PUBLIC_API_RETRY_BASE_DELAY_MS | Base backoff delay (ms) | 250 |
NEXT_PUBLIC_API_RETRY_MAX_DELAY_MS | Max backoff delay (ms) | 3000 |
NEXT_PUBLIC_API_RETRY_JITTER | Enable jitter | true |
Circuit Breaker
Section titled “Circuit Breaker”| Variable | Description | Default |
|---|---|---|
NEXT_PUBLIC_API_CIRCUIT_FAILURES | Failures to open circuit | 5 |
NEXT_PUBLIC_API_CIRCUIT_COOLDOWN_MS | Cooldown duration (ms) | 10000 |
Server-Side Variables (Secrets)
Section titled “Server-Side Variables (Secrets)”| Variable | Description | Required |
|---|---|---|
LICENSE_MONITOR_API_KEY | License Monitor API key | Yes |
LICENSE_MONITOR_BASE_URL | License Monitor base URL | Yes |
LICENSE_MONITOR_TIMEOUT | API timeout (ms) | No (30000) |
Authentication (Okta)
Section titled “Authentication (Okta)”| Variable | Description | Required |
|---|---|---|
AUTH_OKTA_ID | Okta OAuth client ID | Yes |
AUTH_OKTA_SECRET | Okta OAuth client secret | Yes |
AUTH_OKTA_ISSUER | Okta issuer URL | Yes |
NextAuth
Section titled “NextAuth”| Variable | Description | Required |
|---|---|---|
AUTH_SECRET | JWT signing secret | Yes |
AUTH_TRUST_HOST | Trust HOST header | No (false) |
NEXTAUTH_URL | Public base URL | Recommended |
Dashboard
Section titled “Dashboard”| Variable | Description | Default |
|---|---|---|
DASHBOARD_USE_MOCK | Use mock metrics | false |
Example Configurations
Section titled “Example Configurations”Development
Section titled “Development”LICENSE_MONITOR_LOG_LEVEL=debugLICENSE_MONITOR_BIND_ADDRESS=127.0.0.1LICENSE_MONITOR_BIND_PORT=8080LICENSE_MONITOR_API_ENABLED=trueNEXT_PUBLIC_API_BASE_URL=http://localhost:8080NEXT_PUBLIC_LOG_LEVEL=debug
LICENSE_MONITOR_API_KEY=dev-api-keyLICENSE_MONITOR_BASE_URL=http://localhost:8080
AUTH_OKTA_ID=your-okta-client-idAUTH_OKTA_SECRET=your-okta-client-secretAUTH_OKTA_ISSUER=https://dev-xxxxx.okta.com/oauth2/defaultAUTH_SECRET=development-secret-32-chars-minNEXTAUTH_URL=http://localhost:3000
DASHBOARD_USE_MOCK=trueProduction
Section titled “Production”LICENSE_MONITOR_CONFIG=/etc/license-monitor/config.tomlLICENSE_MONITOR_LOG_LEVEL=warnLICENSE_MONITOR_BIND_ADDRESS=127.0.0.1LICENSE_MONITOR_BIND_PORT=8080LICENSE_MONITOR_API_KEY=${LICENSE_MONITOR_API_KEY}ALLOW_PUBLIC_BIND=falseNEXT_PUBLIC_API_BASE_URL=https://api.example.comNEXT_PUBLIC_API_TIMEOUT_MS=15000NEXT_PUBLIC_LOG_LEVEL=infoNEXT_PUBLIC_API_RETRY_MAX_ATTEMPTS=3NEXT_PUBLIC_API_CIRCUIT_FAILURES=5
# Secrets (use secrets manager in production)LICENSE_MONITOR_API_KEY=${LICENSE_MONITOR_API_KEY}LICENSE_MONITOR_BASE_URL=http://license-monitor:8080LICENSE_MONITOR_TIMEOUT=30000
AUTH_OKTA_ID=${AUTH_OKTA_ID}AUTH_OKTA_SECRET=${AUTH_OKTA_SECRET}AUTH_OKTA_ISSUER=https://your-org.okta.com/oauth2/defaultAUTH_SECRET=${AUTH_SECRET}AUTH_TRUST_HOST=trueNEXTAUTH_URL=https://dashboard.example.com
DASHBOARD_USE_MOCK=falseDocker Compose
Section titled “Docker Compose”services: license-monitor: environment: - LICENSE_MONITOR_LOG_LEVEL=warn - LICENSE_MONITOR_BIND_ADDRESS=0.0.0.0 - LICENSE_MONITOR_BIND_PORT=8080 - ALLOW_PUBLIC_BIND=true - LICENSE_MONITOR_API_KEY=${LICENSE_MONITOR_API_KEY}
license-server-detail: environment: - NEXT_PUBLIC_API_BASE_URL=http://license-monitor:8080 - LICENSE_MONITOR_API_KEY=${LICENSE_MONITOR_API_KEY} - LICENSE_MONITOR_BASE_URL=http://license-monitor:8080 - AUTH_OKTA_ID=${AUTH_OKTA_ID} - AUTH_OKTA_SECRET=${AUTH_OKTA_SECRET} - AUTH_OKTA_ISSUER=${AUTH_OKTA_ISSUER} - AUTH_SECRET=${AUTH_SECRET} - NEXTAUTH_URL=${NEXTAUTH_URL}Variable Priority
Section titled “Variable Priority”License Monitor
Section titled “License Monitor”- Command-line arguments (highest)
- Environment variables
- Configuration file
- Default values (lowest)
License Server Detail
Section titled “License Server Detail”- Environment variables (highest)
.env.local(development).env.production(production build).env(all environments)- Default values (lowest)
Security Best Practices
Section titled “Security Best Practices”- Never commit secrets to version control
- Use secrets managers in production (Vault, AWS Secrets Manager)
- Separate environments - use different keys per environment
- Rotate secrets regularly
- Audit access to environment variables
Next Steps
Section titled “Next Steps”- CLI Reference - Command-line options
- Configuration Reference - TOML configuration
- Secrets Management - Secure secrets handling