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

Configuration Schema

Complete reference for Radar Agent configuration.

Top-Level Configuration

server:                            # Required - Server configuration
  grpc_endpoint: string            # Required - gRPC server endpoint
  api_key: string                  # Required - API key for authentication

collection_interval: integer       # Optional - Seconds between collections (default: 60)
deployments: array                 # Required - List of deployments to monitor

Server Configuration

The server section configures connection to the Radar server:

server:
  grpc_endpoint: "http://localhost:50051"  # gRPC endpoint
  api_key: "your-api-key"                  # Authentication key

The api_key is automatically set as the ACCESS_KEY environment variable for gRPC authentication.

Deployment Configuration

Each deployment in the deployments array must specify a type and type-specific fields.

Common Fields

FieldTypeRequiredDescription
namestringDeployment name (must be unique)
typestringDeployment type (case-insensitive)

Standalone Configuration

deployments:
  - id: string                      # Required - Unique deployment ID
    name: string                    # Required - Unique name
    type: "standalone"              # Required
    redis_url: string               # Required - Redis connection URL
    credentials:                    # Optional - Authentication
      password: string              # Optional - Redis password

Example:

deployments:
  - id: "cache-01"
    name: "cache-server"
    type: "standalone"
    redis_url: "redis://redis.example.com:6379"
    credentials:
      password: "${REDIS_PASSWORD}"

For TLS:

deployments:
  - id: "cache-tls-01"
    name: "cache-server-tls"
    type: "standalone"
    redis_url: "rediss://redis.example.com:6380"  # rediss:// for TLS
    credentials:
      password: "${REDIS_PASSWORD}"

Enterprise Configuration

deployments:
  - id: string                      # Required - Unique deployment ID
    name: string                    # Required - Unique name
    type: "enterprise"              # Required
    rest_api:                       # Required - REST API configuration
      host: string                  # Required - REST API hostname
      port: integer                 # Required - REST API port (typically 9443)
      use_tls: boolean              # Required - Use HTTPS (typically true)
      insecure: boolean             # Optional - Skip cert verification (default: false)
      enterprise_admin_url: string  # Optional - Admin UI URL for reference
    enterprise:                     # Optional - Enterprise options
      db_endpoint: string           # Optional - Database endpoint style (external_ip, internal_ip, dns)
    credentials:                    # Required - Authentication
      rest_api:                     # Can also use 'enterprise_api' for compatibility
        basic_auth: string          # Required - "username:password" format

Note: Both rest_api and enterprise_api field names are supported in the credentials section for backward compatibility.

Example:

deployments:
  - id: "ent-prod"
    name: "production-enterprise"
    type: "enterprise"
    rest_api:
      host: "enterprise.example.com"
      port: 9443
      use_tls: true
      insecure: true  # For self-signed certificates
      enterprise_admin_url: "https://enterprise.example.com:8443"  # Optional UI reference
    enterprise:
      db_endpoint: "external_ip"
    credentials:
      rest_api:  # or 'enterprise_api'
        basic_auth: "admin@redis.local:${ENTERPRISE_PASSWORD}"

Cluster Configuration

deployments:
  - id: string                      # Required - Unique deployment ID
    name: string                    # Required - Unique name
    type: "cluster"                 # Required
    redis_urls: array<string>       # Required - Seed nodes for discovery
    credentials:                    # Optional - Authentication
      username: string              # Optional - Cluster username
      password: string              # Optional - Cluster password

Example:

deployments:
  - id: "cluster-01"
    name: "main-cluster"
    type: "cluster"
    redis_urls:
      - "node1.example.com:7000"
      - "node2.example.com:7000"
      - "node3.example.com:7000"
    credentials:
      password: "${CLUSTER_PASSWORD}"

Sentinel Configuration

deployments:
  - id: string                      # Required - Unique deployment ID
    name: string                    # Required - Unique name
    type: "sentinel"                # Required
    master_name: string             # Required - Name of master in Sentinel
    sentinel_urls: array<string>    # Required - Sentinel endpoints
    credentials:                    # Optional - Authentication
      password: string              # Optional - Redis password
      sentinel_password: string     # Optional - Sentinel password (if different)

Example:

deployments:
  - id: "sentinel-01"
    name: "ha-redis"
    type: "sentinel"
    master_name: "mymaster"
    sentinel_urls:
      - "sentinel1.example.com:26379"
      - "sentinel2.example.com:26379"
      - "sentinel3.example.com:26379"
    credentials:
      password: "${REDIS_PASSWORD}"
      sentinel_password: "${SENTINEL_PASSWORD}"

Complete Example

# Agent configuration
agent:
  id: "radar-agent-001"
  collection_interval: "60s"

# Server configuration
server:
  grpc_url: "https://grpc.radar.redis.io:443"  # Production Radar gRPC endpoint
  api_key: "${RADAR_API_KEY}"

# Deployment configurations
deployments:
  # Enterprise cluster
  - id: "ent-01"
    name: "enterprise-production"
    type: "enterprise"
    rest_api:
      host: "cluster.redis.local"
      port: 9443
      use_tls: true
      insecure: false
      enterprise_admin_url: "https://cluster.redis.local:8443"  # Optional
    enterprise:
      db_endpoint: "external_ip"
    credentials:
      rest_api:  # or enterprise_api
        basic_auth: "admin@redis.local:${ENT_PASSWORD}"

  # Standalone instance
  - id: "cache-01"
    name: "session-cache"
    type: "standalone"
    redis_url: "redis://cache.redis.local:6379"
    credentials:
      password: "${CACHE_PASSWORD}"

  # Redis Cluster
  - id: "cluster-01"
    name: "data-cluster"
    type: "cluster"
    redis_urls:
      - "cluster1.redis.local:7000"
      - "cluster2.redis.local:7000"
      - "cluster3.redis.local:7000"
    credentials:
      password: "${CLUSTER_PASSWORD}"

  # Sentinel HA
  - id: "sentinel-01"
    name: "ha-master"
    type: "sentinel"
    master_name: "mymaster"
    sentinel_urls:
      - "sentinel1.redis.local:26379"
      - "sentinel2.redis.local:26379"
      - "sentinel3.redis.local:26379"
    credentials:
      password: "${REDIS_PASSWORD}"

Environment Variable Expansion

Configuration values can reference environment variables:

  • ${VAR} - Value must be set
  • ${VAR:-default} - Use default if not set

Example:

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

deployments:
  - id: "redis-01"
    name: "redis"
    type: "standalone"
    redis_url: "${REDIS_URL:-redis://localhost:6379}"
    credentials:
      password: "${REDIS_PASSWORD}"

Environment Variable Overrides

Configuration can be overridden using environment variables:

Global Settings

export GRPC_ENDPOINT=https://grpc.radar.redis.io:443
export COLLECTION_INTERVAL=30
export RADAR_API_KEY=your-api-key  # For authentication

Per-Deployment Settings

For Enterprise deployments (using the id field):

# For deployment with id: "ent-01"
export RADAR_ENTERPRISE_ENT_01_REST_API_URL=https://new-url:9443
export RADAR_ENTERPRISE_ENT_01_USERNAME=newuser
export RADAR_ENTERPRISE_ENT_01_PASSWORD=newpass
export RADAR_ENTERPRISE_ENT_01_INSECURE=true

For single Standalone deployment:

export REDIS_HOST=redis.example.com
export REDIS_PORT=6379
export REDIS_PASSWORD=secret

Authentication

The agent requires authentication with the Radar server:

  1. Via configuration:

    server:
      api_key: "your-api-key"  # Automatically sets ACCESS_KEY
    
  2. Via environment variable:

    export ACCESS_KEY=your-api-key
    

The agent will automatically set the ACCESS_KEY environment variable from the config's api_key field if not already set.

Validation

Validate your configuration:

# Validate entire configuration
radar-agent --validate

# Validate specific deployment
radar-agent validate --deployment enterprise-production

# Test collection from deployment
radar-agent test --deployment session-cache

# Dry run (collect but don't submit)
radar-agent --dry-run

Migration from Legacy Formats

Old Format (pre-v2)

# Old format
grpc_endpoint: "http://localhost:50051"
deployments:
  - name: "enterprise"
    type: "enterprise"
    rest_api_url: "https://host:9443"
    username: "admin"
    password: "pass"

New Format (v2+)

# New format
server:
  grpc_endpoint: "http://localhost:50051"
  api_key: "your-key"

deployments:
  - name: "enterprise"
    type: "enterprise"  # Now case-insensitive
    id: "ent-01"
    credentials:
      rest_api:  # or enterprise_api for compatibility
        url: "https://host:9443"
        username: "admin"
        password: "pass"
        insecure: true  # For self-signed certs

Removed Fields

These fields are no longer supported:

  • send_interval - Removed for simplicity
  • max_batch_size - Removed for simplicity
  • auto_discover - Not implemented