Command Line Reference
Synopsis
radar-collector [OPTIONS] [COMMAND]
Global Options
| Option | Environment | Description | Default |
|---|---|---|---|
-c, --config <PATH> | - | Configuration file path | radar-collector.yml |
--json-logs | - | Enable JSON formatted logs | false |
-l, --log-level <LEVEL> | RUST_LOG | Log level: trace, debug, info, warn, error | info |
--once | - | Run once and exit | false |
--dry-run | - | Collect but don’t submit | false |
--validate | - | Validate config and exit | false |
--output-file [PATH] | - | Write collection to file (offline mode). Auto-generates filename if PATH not specified | - |
--output-dir <DIR> | - | Override default output directory for offline collections | - |
--redact | - | Force-enable redaction for collected data | false |
Subcommands
connect
Connect this collector to Radar using a browser-based activation flow. The collector opens a browser window to the Radar UI where you authenticate and approve the collector. On success, the collector stores its credential locally and begins collecting.
If the default config file (radar-collector.yml) is not found and no stored credential exists from a previous activation, the collector automatically enters this activation flow on first run.
# Start browser-based activation
radar-collector connect
# Activation with a custom Radar API URL
radar-collector connect --server-url https://radar.redis.io/api
# Print the activation URL without opening a browser
radar-collector connect --no-browser
Options:
--server-url <URL>- Override the Radar API base URL used for activation--no-browser- Disable automatic browser launch; print the activation URL only
validate
Validate a specific deployment configuration and test connectivity.
# Validate specific deployment
radar-collector validate --deployment my-redis
# With custom config
radar-collector --config custom.yml validate --deployment production
Options:
-d, --deployment <NAME>- Name of deployment to validate (required)
test
Test collection from a specific deployment (full collection).
# Test specific deployment
radar-collector test --deployment my-redis
# Test with debug logging
radar-collector --log-level debug test --deployment my-redis
Options:
-d, --deployment <NAME>- Name of deployment to test (required)
submit
Submit a previously collected offline data file to the server.
# Submit offline collection file
radar-collector submit --file /path/to/collection.json
# With custom config for server settings
radar-collector --config custom.yml submit --file collection.json
Options:
-f, --file <PATH>- Path to offline collection JSON file (required)
Usage Examples
Basic Operation
# Run with default config
radar-collector
# Run with custom config
radar-collector --config /etc/radar/config.yml
# Run once and exit
radar-collector --once
# Dry run (no submission)
radar-collector --dry-run
Offline Collection
# Collect to auto-generated file (redaction comes from config, default enabled)
radar-collector --once --output-file
# Collect to specific file
radar-collector --once --output-file /path/to/collection.json
# Collect with custom output directory
radar-collector --once --output-file --output-dir /var/lib/radar
# Force-enable redaction via CLI
radar-collector --once --output-file --redact
# Submit previously collected file
radar-collector submit --file radar-collection-hostname-v0.1.0-20251014-120000.json
Validation
# Validate entire configuration
radar-collector --validate
# Validate specific deployment
radar-collector validate --deployment redis-production
Debugging
# Enable debug logging
radar-collector --log-level debug
# JSON formatted logs
radar-collector --json-logs
# Test collection without submission
radar-collector --dry-run --once
Environment Variables
Authentication
ACCESS_KEY- API key for gRPC authentication
Configuration Overrides
Global settings:
GRPC_ENDPOINT- Override gRPC server endpointCOLLECTION_INTERVAL- Override collection interval (seconds)
Per-deployment overrides (by deployment ID):
# Software deployment with ID "ent-01"
export REDIS_ENTERPRISE_ENT_01_REST_API_URL=https://enterprise:9443
export REDIS_ENTERPRISE_ENT_01_USERNAME=admin
export REDIS_ENTERPRISE_ENT_01_PASSWORD=secret
export REDIS_ENTERPRISE_ENT_01_SSL_NO_VERIFY=true
# Standalone defaults (when only one exists)
export REDIS_HOST=localhost
export REDIS_PORT=6379
export REDIS_PASSWORD=mypassword
Logging
RUST_LOG- Control log verbosityerror- Errors onlywarn- Warnings and errorsinfo- Standard operation (default)debug- Detailed operationstrace- All data including responses
Example:
RUST_LOG=debug radar-collector
RUST_LOG=radar_collector=debug,tonic=warn radar-collector
Exit Codes
0- Success1- Error (configuration, connection, or runtime error)
Signal Handling
The radar-collector handles the following signals gracefully:
SIGINT(Ctrl+C) - Graceful shutdownSIGTERM- Graceful shutdown
During shutdown:
- Current collection completes
- Pending submissions are sent
- Connections are closed
- Final metrics are logged