Command Line Reference
Synopsis
radar-agent [OPTIONS] [COMMAND]
Global Options
Option | Environment | Description | Default |
---|---|---|---|
-c, --config <PATH> | - | Configuration file path | radar-agent.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 <LEVEL> | - | Redaction level: none, credentials, all | all |
Subcommands
validate
Validate a specific deployment configuration and test connectivity.
# Validate specific deployment
radar-agent validate --deployment my-redis
# With custom config
radar-agent --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-agent test --deployment my-redis
# Test with debug logging
radar-agent --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-agent submit --file /path/to/collection.json
# With custom config for server settings
radar-agent --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-agent
# Run with custom config
radar-agent --config /etc/radar/config.yml
# Run once and exit
radar-agent --once
# Dry run (no submission)
radar-agent --dry-run
Offline Collection
# Collect to auto-generated file with full redaction
radar-agent --once --output-file
# Collect to specific file
radar-agent --once --output-file /path/to/collection.json
# Collect with custom output directory
radar-agent --once --output-file --output-dir /var/lib/radar
# Collect with credentials-only redaction
radar-agent --once --output-file --redact credentials
# Collect with no redaction (debug only)
radar-agent --once --output-file --redact none
# Submit previously collected file
radar-agent submit --file radar-collection-hostname-v0.1.0-20251014-120000.json
Validation
# Validate entire configuration
radar-agent --validate
# Validate specific deployment
radar-agent validate --deployment redis-production
Debugging
# Enable debug logging
radar-agent --log-level debug
# JSON formatted logs
radar-agent --json-logs
# Test collection without submission
radar-agent --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):
# Enterprise deployment with ID "ent-01"
export ENT_01_REST_API_URL=https://enterprise:9443
export ENT_01_USERNAME=admin
export ENT_01_PASSWORD=secret
export ENT_01_INSECURE=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-agent
RUST_LOG=radar_agent=debug,tonic=warn radar-agent
Exit Codes
0
- Success1
- Error (configuration, connection, or runtime error)
Signal Handling
The agent 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