Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Environment Variables Reference

Complete reference for all environment variables supported by Radar Collector.

Two Types of Environment Variable Usage

Variables are expanded when the configuration file is loaded:

server:
  api_key: "${RADAR_API_KEY}"
  grpc_url: "${RADAR_SERVER:-https://grpc.radar.redis.io:443}"

Syntax:

  • ${VAR} - Required (fails if not set)
  • ${VAR:-default} - Use default if VAR is unset or empty
  • ${VAR-default} - Use default if VAR is unset (empty string is valid)

Important: Only ${VAR} (braced) syntax is expanded. Bare $VAR is NOT expanded. This allows literal $ characters in YAML values (e.g., passwords like my$ecret). Interpolation is applied after YAML parsing, so # and other YAML-significant characters inside interpolated secrets are treated as data, not syntax.

When to use which:

  • Use :- when empty values should fall back to default
  • Use - when empty is a valid value (e.g., Redis with no password: password: ${REDIS_PASSWORD-})

Use for: Per-deployment credentials, secrets, environment-specific values

2. Runtime Overrides

Variables override configuration after YAML parsing. See sections below for supported variables.

Use for: Quick testing, debugging, container environments


Global Configuration

VariableTypeDescriptionDefault
GRPC_ENDPOINTOverridegRPC server URLFrom config
COLLECTION_INTERVALOverrideCollection interval (seconds)From config
ACCESS_KEYDirectAPI key for gRPC auth (see Authentication)From server.api_key

Authentication

The collector uses ACCESS_KEY for gRPC authentication. You can set it:

  1. Via config file (recommended):

    server:
      api_key: "${MY_API_KEY}"
    
  2. Via environment variable:

    export ACCESS_KEY=your-api-key
    

If both are set, ACCESS_KEY takes precedence.


Standalone Deployments

Global Overrides (All Standalone Deployments)

⚠️ Warning: These apply to ALL standalone deployments.

VariableDescription
REDIS_HOSTOverride Redis host for all standalone deployments
REDIS_PORTOverride Redis port for all standalone deployments
REDIS_PASSWORDOverride password for all standalone deployments

Per-Deployment Overrides

Replace {ID} with deployment ID in UPPERCASE with -_.

Example: deployment id: "redis-prod"REDIS_PROD

VariableDescription
REDIS_STANDALONE_{ID}_HOSTOverride Redis host
REDIS_STANDALONE_{ID}_PORTOverride Redis port
REDIS_STANDALONE_{ID}_PASSWORDOverride password

Example:

# For deployment with id: "redis-prod"
export REDIS_STANDALONE_REDIS_PROD_HOST=prod.example.com
export REDIS_STANDALONE_REDIS_PROD_PORT=6380
export REDIS_STANDALONE_REDIS_PROD_PASSWORD=secret

Cluster Deployments

Global Override (All Cluster Deployments)

⚠️ Warning: Applies to ALL cluster deployments.

VariableDescription
REDIS_PASSWORDOverride password for all cluster deployments

Per-Deployment Override

VariableDescription
REDIS_CLUSTER_{ID}_PASSWORDOverride password for specific cluster

Example:

# For deployment with id: "cluster-01"
export REDIS_CLUSTER_CLUSTER_01_PASSWORD=cluster-secret

Sentinel Deployments

Global Override (All Sentinel Deployments)

⚠️ Warning: Applies to ALL sentinel deployments.

VariableDescription
REDIS_PASSWORDOverride password for all sentinel deployments

Per-Deployment Override

VariableDescription
REDIS_SENTINEL_{ID}_PASSWORDOverride password for specific sentinel

Example:

# For deployment with id: "sentinel-ha"
export REDIS_SENTINEL_SENTINEL_HA_PASSWORD=sentinel-secret

Redis Software (Enterprise) Deployments

All per-deployment. Replace {ID} with deployment ID in UPPERCASE with -_.

VariableDescription
REDIS_ENTERPRISE_{ID}_REST_API_URLOverride REST API URL (HTTPS only; full URL with scheme)
REDIS_ENTERPRISE_{ID}_ADMIN_URLOverride admin console URL
REDIS_ENTERPRISE_{ID}_USERNAMEOverride REST API username
REDIS_ENTERPRISE_{ID}_PASSWORDOverride REST API password
REDIS_ENTERPRISE_{ID}_SSL_NO_VERIFYSkip TLS certificate verification while keeping HTTPS enabled (true/false)

Example:

# For deployment with id: "ent-01"
export REDIS_ENTERPRISE_ENT_01_REST_API_URL=https://enterprise.example.com:9443
export REDIS_ENTERPRISE_ENT_01_ADMIN_URL=https://admin.example.com:8443
export REDIS_ENTERPRISE_ENT_01_USERNAME=admin@example.com
export REDIS_ENTERPRISE_ENT_01_PASSWORD=secret
export REDIS_ENTERPRISE_ENT_01_SSL_NO_VERIFY=true

REDIS_ENTERPRISE_{ID}_SSL_NO_VERIFY defaults to true. Set to false to require certificate verification.


Retry Configuration

Control retry behavior for failed operations:

VariableTypeDescriptionDefault
RETRY_MAX_ATTEMPTSintegerMaximum retry attempts3
RETRY_INITIAL_DELAY_SECSintegerInitial delay in seconds1
RETRY_MAX_DELAY_SECSintegerMaximum delay in seconds30
RETRY_MULTIPLIERfloatBackoff multiplier2.0

Example:

export RETRY_MAX_ATTEMPTS=5
export RETRY_INITIAL_DELAY_SECS=2
export RETRY_MAX_DELAY_SECS=60
export RETRY_MULTIPLIER=3.0

Advanced Settings

VariableTypeDescriptionDefault
CONCURRENT_COLLECTIONbooleanEnable concurrent collectiontrue

Set to false to disable concurrent collection (useful for debugging):

export CONCURRENT_COLLECTION=false

Best Practices

  1. Use YAML interpolation for secrets and per-deployment values:

    credentials:
      password: "${REDIS_PROD_PASSWORD}"  # Different var per deployment
    
  2. Use runtime overrides for testing/debugging:

    GRPC_ENDPOINT=http://localhost:50051 radar-collector
    
  3. Avoid global overrides with multiple deployments:

    • REDIS_PASSWORD affects ALL deployments
    • ✅ Use REDIS_STANDALONE_{ID}_PASSWORD for specific deployments
    • ✅ Or use YAML interpolation with different variables
  4. ID transformation rules:

    • Deployment id: "my-redis"MY_REDIS
    • Deployment id: "redis_prod"REDIS_PROD
    • Deployment id: "Redis-01"REDIS_01