DocsRelay SetupRelay Configuration Reference

Relay Configuration Reference

Complete reference for all AsPeekIt Discovery Relay configuration options, including YAML settings, environment variable overrides, and default values.


Configuration File

The relay reads its configuration from a YAML file. By default it looks for /etc/idp-relay/relay.yaml, but you can specify a different path with the -config flag. All settings can also be overridden via environment variables.

# Use default path
idp-relay

# Use a custom config file
idp-relay -config /opt/relay/my-config.yaml

Relay Identity

These settings identify the relay to the AsPeekIt backend. The relay_id must match the Relay ID of the relay created on the Relays page.

  • relay_id (required) — A unique machine-readable identifier. Use a descriptive slug like "relay-milan-dc" or "relay-office-london". Env: IDP_RELAY_ID
  • relay_name (optional) — A human-readable display name. Env: IDP_RELAY_NAME
# Unique identifier for this relay (required).
# Must match the Relay ID created on the Relays page.
relay_id: "relay-datacenter-01"

# Human-readable name (optional).
relay_name: "Datacenter 01 Relay"

Backend Connection

Configure how the relay connects to the AsPeekIt platform. Both settings are required.

  • backend_url (required) — The base URL of your AsPeekIt instance, without a trailing slash. Env: IDP_BACKEND_URL
  • api_key (required) — The API key generated for this relay. Starts with idpr_. Env: IDP_API_KEY

Warning: The API key is a secret. Do not commit it to version control. Use environment variables, Kubernetes Secrets, or a secrets manager in production.

# URL of the AsPeekIt platform (required).
backend_url: "https://idp.example.com"

# Relay API key (required). Created by an admin on the Relays page.
# Format: idpr_<random>
api_key: "idpr_CHANGE_ME"

Polling & Scheduling

Control how often the relay polls for configuration and for pending jobs, how many discovery jobs it runs at once, per-job timeouts and the shutdown grace period.

  • config_poll_interval_minutes (default: 60) — How often the relay fetches its configuration from the backend. The backend can override it (config_poll_interval_minutes in the config and heartbeat responses) and the relay adjusts its timer. Env: IDP_CONFIG_POLL_INTERVAL
  • job_poll_interval_seconds (default: 30) — How often the relay checks for pending jobs, e.g. a discovery started from the UI or a retry. Env: IDP_JOB_POLL_INTERVAL
  • max_concurrent_jobs (default: 3) — Maximum number of discovery jobs running in parallel. Increase for relays with many assigned environments or fast targets. Env: IDP_MAX_CONCURRENT_JOBS
  • job_timeout_minutes (default: 25) — If a single discovery job exceeds this duration, it is cancelled. Increase for very large environments (e.g., thousands of VMs)
  • heartbeat_interval_seconds (default: 300) — How often the relay sends a heartbeat. The backend marks a relay stale after RELAY_STALE_AFTER_MINUTES (default 15) and offline after RELAY_OFFLINE_AFTER_MINUTES (default 60) without contact
  • shutdown_timeout_seconds (default: 60) — On SIGTERM, running jobs get this long to finish before being cancelled; cancelled jobs still submit partial results (success=false). Keep systemd TimeoutStopSec or Kubernetes terminationGracePeriodSeconds above this value plus about 35 seconds
# How often to poll the backend for configuration (minutes).
config_poll_interval_minutes: 60

# How often to check for pending (manually started) jobs (seconds).
job_poll_interval_seconds: 30

# Maximum concurrent discovery jobs.
max_concurrent_jobs: 3

# Timeout for a single discovery job (minutes).
job_timeout_minutes: 25

# How often to send heartbeats to the backend (seconds).
heartbeat_interval_seconds: 300

# Grace period for running jobs on SIGTERM (seconds).
shutdown_timeout_seconds: 60

Timeouts & Retries

Fine-tune network timeouts for communication with the backend and with discovery targets.

  • send_timeout_seconds (default: 120) — HTTP timeout when submitting results to the backend. Increase if you have a slow connection or very large payloads
  • connect_timeout_seconds (default: 30) — TCP connection timeout when reaching discovery targets (e.g., Kubernetes API, vSphere endpoint)
  • retry_count (default: 3) — How many times the relay retries a failed result submission before giving up
  • retry_delay_seconds (default: 10) — Base delay between retries, with exponential backoff and jitter. 4xx answers other than 408 and 429 are not retried
# Timeout for sending results to the backend (seconds).
send_timeout_seconds: 120

# Timeout for connecting to discovery targets (seconds).
connect_timeout_seconds: 30

# Number of retries for failed result submissions.
retry_count: 3

# Base delay between retries (seconds), exponential backoff with jitter.
retry_delay_seconds: 10

TLS Settings

Configure TLS for communication with the AsPeekIt backend. By default, the relay uses the system CA certificates. Use these settings if your backend uses a private CA or if mutual TLS is required.

  • tls_ca_file — Path to a PEM-encoded CA certificate file. Use this if your AsPeekIt backend uses a self-signed or private CA certificate. Env: IDP_TLS_CA_FILE
  • tls_cert_file / tls_key_file — Client certificate and key, for a reverse proxy in front of the platform that requires one. Both must be provided together. Env: IDP_TLS_CERT_FILE, IDP_TLS_KEY_FILE
  • tls_skip_verify (default: false) — Disable TLS certificate verification. Env: IDP_TLS_SKIP_VERIFY

Warning: Never set tls_skip_verify to true in production. It disables all TLS certificate validation, making the connection vulnerable to man-in-the-middle attacks.

# Custom CA certificate for backend TLS verification.
tls_ca_file: ""

# Client certificate for mutual TLS (optional).
tls_cert_file: ""
tls_key_file: ""

# Skip TLS verification (development only).
tls_skip_verify: false

Kubernetes and Image Scan

Two settings only matter for Kubernetes zones:

  • kubernetes_allow_external_auth (default: false) — Kubeconfigs that use exec or auth-provider plugins, or local file paths (tokenFile, client-key, certificate-authority), are refused unless this is true: a kubeconfig stored in the platform could otherwise run commands or read files on the relay host
  • trivy_path (default: "trivy") — Trivy client used when a Kubernetes zone enables connection_config.image_scan. The relay runs trivy image --server against the zone trivy_server_url, once per digest every interval_hours, only for pods on nodes without a scanning agent; registry credentials and the server token are passed in the environment, never on the command line. The Docker image ships it at /usr/local/bin/trivy. Env: IDP_TRIVY_PATH
# Allow kubeconfigs with exec/auth-provider plugins or local file paths.
kubernetes_allow_external_auth: false

# Trivy binary for the image scan of Kubernetes zones.
trivy_path: "trivy"

Logging

Control the relay log output format, verbosity, and destination.

  • log_level (default: "info") — Set to "debug" for verbose output during troubleshooting, "warn" or "error" to reduce noise. Env: IDP_LOG_LEVEL
  • log_format (default: "text") — Use "json" for structured logging in production (easier to parse with log aggregators). Env: IDP_LOG_FORMAT
  • log_file (default: "" / stdout) — Write logs to a file instead of stdout. Useful for systemd deployments where you want a dedicated log file alongside journald
# Log level: debug, info, warn, error
log_level: "info"

# Log format: text (human-readable) or json (structured)
log_format: "text"

# Log to a file instead of stdout. Leave empty for stdout.
log_file: ""

Environment Variable Overrides

These settings can be overridden via environment variables (the others only in the file). This is especially useful for Docker and Kubernetes deployments where configuration is injected via the environment.

Note: Environment variables take precedence over the YAML config file. If both are set, the environment variable wins.

IDP_RELAY_ID              # relay_id
IDP_RELAY_NAME            # relay_name
IDP_BACKEND_URL           # backend_url
IDP_API_KEY               # api_key
IDP_LOG_LEVEL             # log_level
IDP_LOG_FORMAT            # log_format
IDP_TLS_SKIP_VERIFY       # tls_skip_verify (true/false)
IDP_MAX_CONCURRENT_JOBS   # max_concurrent_jobs
IDP_CONFIG_POLL_INTERVAL  # config_poll_interval_minutes
IDP_JOB_POLL_INTERVAL     # job_poll_interval_seconds
IDP_TLS_CA_FILE           # tls_ca_file
IDP_TLS_CERT_FILE         # tls_cert_file
IDP_TLS_KEY_FILE          # tls_key_file
IDP_TRIVY_PATH            # trivy_path

Full Example Configuration

A complete configuration file with all options and their default values.

relay_id: "relay-datacenter-01"
relay_name: "Datacenter 01 Relay"

backend_url: "https://idp.example.com"
api_key: "idpr_CHANGE_ME"

config_poll_interval_minutes: 60
job_poll_interval_seconds: 30
max_concurrent_jobs: 3
job_timeout_minutes: 25
heartbeat_interval_seconds: 300
shutdown_timeout_seconds: 60

kubernetes_allow_external_auth: false
trivy_path: "trivy"

send_timeout_seconds: 120
connect_timeout_seconds: 30
retry_count: 3
retry_delay_seconds: 10

tls_ca_file: ""
tls_cert_file: ""
tls_key_file: ""
tls_skip_verify: false

log_level: "info"
log_format: "text"
log_file: ""