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

Command Line Reference

Synopsis

radar-agent [OPTIONS] [COMMAND]

Global Options

OptionEnvironmentDescriptionDefault
-c, --config <PATH>-Configuration file pathradar-agent.yml
--json-logs-Enable JSON formatted logsfalse
-l, --log-level <LEVEL>RUST_LOGLog level: trace, debug, info, warn, errorinfo
--once-Run once and exitfalse
--dry-run-Collect but don't submitfalse
--validate-Validate config and exitfalse
--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, allall

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 endpoint
  • COLLECTION_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 verbosity
    • error - Errors only
    • warn - Warnings and errors
    • info - Standard operation (default)
    • debug - Detailed operations
    • trace - All data including responses

Example:

RUST_LOG=debug radar-agent
RUST_LOG=radar_agent=debug,tonic=warn radar-agent

Exit Codes

  • 0 - Success
  • 1 - Error (configuration, connection, or runtime error)

Signal Handling

The agent handles the following signals gracefully:

  • SIGINT (Ctrl+C) - Graceful shutdown
  • SIGTERM - Graceful shutdown

During shutdown:

  1. Current collection completes
  2. Pending submissions are sent
  3. Connections are closed
  4. Final metrics are logged