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

Running the Agent

The agent supports multiple operational modes:

Continuous Mode (Production)

Standard production mode - continuously collects metrics and submits to server.

# Default configuration file (radar-agent.yml)
./radar-agent

# Custom configuration
./radar-agent --config /etc/radar/production.yml

# With debug logging
RUST_LOG=debug ./radar-agent

Behavior:

  • Collects from all configured deployments at specified intervals
  • Automatically submits data to Radar server via gRPC
  • Runs continuously until stopped with SIGTERM/SIGINT
  • Gracefully completes current collection before shutdown

Use when:

  • Running in production environments
  • Deployed as systemd service or Kubernetes pod
  • Continuous monitoring is required

Offline Mode

Collect data to local files for manual inspection before submission.

Collect to File

# Auto-generated filename (includes hostname, version, timestamp)
./radar-agent --once --output-file
# Creates: radar-collection-hostname-v0.1.0-20251014-120000.json

# Custom path
./radar-agent --once --output-file /var/lib/radar/collection.json

# With specific redaction level
./radar-agent --once --output-file --redact credentials

Redaction Levels

all (default) - Maximum privacy:

  • Passwords → ***REDACTED***
  • API keys → ***REDACTED***
  • Hostnames → host-a1b2c3d4.domain.com (deterministic hash)
  • IP addresses → 192.xxx.xxx.xxx (first octet only)
  • Port numbers → 6xxx (first digit only)

credentials - Moderate privacy:

  • Passwords → ***REDACTED***
  • API keys → ***REDACTED***
  • Hostnames, IPs, ports → visible

none - No redaction (debug only):

  • All data visible in plaintext
  • Only use in isolated, secure environments

Submit Collected Data

# Submit previously collected file
./radar-agent submit --file radar-collection-hostname-v0.1.0-20251014-120000.json

# With custom server config
./radar-agent --config production.yml submit --file collection.json

Use when:

  • Air-gapped environments requiring manual file transfer
  • Security reviews needed before cloud submission
  • Compliance workflows require approval process
  • Local debugging and analysis

Test Mode

Test single deployment without affecting production monitoring.

# Collect and submit once
./radar-agent test --deployment redis-prod

# Collect without submitting (dry run)
./radar-agent test --deployment redis-prod --dry-run

# With debug output
RUST_LOG=debug ./radar-agent test --deployment enterprise-cluster

Behavior:

  • Collects from specified deployment once
  • Shows collected data (in dry-run mode)
  • Exits after single collection
  • Does not affect other deployments

Use when:

  • Testing new deployment configuration
  • Verifying connectivity before production
  • Debugging collection issues
  • Validating data format

Validation Mode

Validate configuration and test connectivity without collecting data.

# Validate all deployments
./radar-agent --validate

# Validate specific deployment
./radar-agent validate --deployment redis-prod

Use when:

  • First-time configuration setup
  • Troubleshooting connection issues
  • Verifying credentials
  • Pre-deployment checks

Additional Options

Logging Levels

Control log verbosity with RUST_LOG:

# Info (default) - standard operational messages
RUST_LOG=info ./radar-agent

# Debug - detailed operational information
RUST_LOG=debug ./radar-agent

# Trace - very verbose, includes all data
RUST_LOG=trace ./radar-agent

Graceful Shutdown

The agent handles SIGTERM and SIGINT signals gracefully:

  1. Receives shutdown signal
  2. Stops scheduling new collections
  3. Completes current collection in progress
  4. Exits cleanly
# Send graceful shutdown signal
kill -TERM <pid>

# Or use Ctrl+C
^C

Running in Production

For production deployments, see: