Docs

Agent Configuration File (agent.yaml)

The agent configuration file is the single file passed to the agent at startup via the -c flag. It defines the agent's identity, how policies are loaded, which backends are active, and optional secrets management.

docker run ... netboxlabs/orb-agent:latest run -c /opt/orb/agent.yaml

Top-Level Structure

version: 1.0          # Optional
orb:
  labels: ...         # Agent identity labels
  config_manager: ... # How policies are loaded (required)
  backends: ...       # Which backends are enabled (required)
  policies: ...       # Inline policies (only with config_manager.active: local)
  secrets_manager: .. # Optional: Vault secret resolution
KeyRequiredDescription
versionNoConfig schema version (informational)
orb.labelsNoKey/value pairs that identify this agent instance. Used by the Git config manager to match selector.yaml entries
orb.config_managerYesDefines where policies come from (local or git)
orb.backendsYesDeclares which discovery backends to run and their common settings
orb.policiesOnly with localInline policy definitions. Ignored when config_manager.active is git
orb.secrets_managerNoConfigures Vault to resolve ${vault://...} references at runtime

orb.labels

Free-form key/value pairs that identify this agent instance. When using the Git config manager, labels are matched against selector.yaml to determine which policies apply to this agent.

orb:
  labels:
    region: EU
    pop: ams02
    environment: production

orb.config_manager

Controls how the agent loads policies. Exactly one source is active at a time.

orb:
  config_manager:
    active: local   # or: git
    sources:
      local: ...
      git: ...
ParameterTypeRequiredDescription
activestringYesWhich source to use: local or git

local

Policies are read directly from orb.policies in the same config file. No additional parameters required.

orb:
  config_manager:
    active: local

git

Policies are fetched from a Git repository. See the full Git configuration manager documentation.

orb:
  config_manager:
    active: git
    sources:
      git:
        url: "https://github.com/myorg/policyrepo"
        branch: main
        schedule: "*/5 * * * *"
        auth: basic
        username: myuser
        password: ${GIT_TOKEN}
ParameterTypeRequiredDescription
urlstringYesGit repository URL
branchstringNoBranch to use (default: repository default branch)
schedulecronNoHow often to poll for changes. If omitted, policies are fetched once at startup
authstringNobasic (password or token), ssh, or github_app. Omit for public repositories
usernamestringNoUsername for basic auth
passwordstringNoPassword or token for basic auth; passphrase for SSH keys
private_keystringNoPath to SSH private key file
skip_tlsboolNoSkip TLS certificate verification (default: false)
github_app.client_idstringWith github_appGitHub App Client ID (preferred) or numeric App ID
github_app.installation_idstringWith github_appNumeric id of the app's installation on the repo owner
github_app.private_keystringWith github_appPath to the app's .pem key, or the PEM content itself

orb.backends

Declares which backends are enabled. Each key activates a backend. The common sub-key holds settings shared across all backends.

orb:
  backends:
    common:
      diode:
        target: grpc://192.168.0.100:8080/diode
        client_id: ${DIODE_CLIENT_ID}
        client_secret: ${DIODE_CLIENT_SECRET}
        agent_name: agent01
    device_discovery:   # enabled, using defaults
    snmp_discovery:     # enabled, using defaults

common.diode

Shared Diode connection settings used by all discovery backends.

ParameterTypeRequiredDescription
targetstringYes*Diode server gRPC endpoint, e.g. grpc://host:8080/diode
client_idstringYes*Diode client ID
client_secretstringYes*Diode client secret
agent_namestringNoLabel attached to all ingested data
dry_runboolNoWhen true, writes output to files instead of sending to Diode (default: false)
dry_run_output_dirstringNoDirectory for dry-run output files (default: current directory)

* Not required when dry_run: true.

common.otlp

Optional OpenTelemetry export for backend metrics.

ParameterTypeRequiredDescription
grpcstringNogRPC endpoint for OTLP export, e.g. grpc://collector:4317
httpstringNoHTTP endpoint for OTLP export, e.g. http://collector:4318 (used by pktvisor)
agent_labelsmapNoExtra key/value labels attached to all exported telemetry

A grpc or http URL can carry a login, as grpc://user:password@collector:4317, or user:password@collector:4317 without a scheme. No component sends that login to the collector as a credential, and with one some cannot export at all:

  • Every discovery backend, the worker, snmp_telemetry and gnmi_telemetry are given the grpc URL as written, in --otel-endpoint. The discovery backends and the worker are also given it as their Diode target when no Diode target is set. pktvisor is given only the host and the port of the http URL. The agent's own log export, outside the fleet config manager, uses the grpc URL's host and port, and a value without a scheme as written.
  • With a scheme, the Go backends and the agent's own log export drop the login and export to the host and port without it. The worker and device_discovery, written in Python, put the login into the address they dial, which no resolver reads, so every export fails (Misformatted domain name).
  • Without a scheme, every export fails: of the agent's own log, of the worker and device_discovery, and of every other Go backend, which dials an address holding the login, or an empty one. gnmi_telemetry refuses it and does not start.
  • Percent-encode a %, /, ?, # or @ in the user or the password, as %25, %2F, %3F, %23 and %40. Unencoded, a /, ? or # ends the URL's authority early, and part of the login can be read as the host and the port, which are then logged and dialled unmasked; a % is read as the start of an escape.

Wherever the agent or a backend logs the URL, or an error quotes it, the user and the password are masked together as ********, as in grpc://********@collector:4317: in each backend's startup lines, in the lines a backend's process prints, which the agent relays, and in the errors of the agent's own log export. In those relayed lines the login is masked before an @ as written, percent-decoded, as a gRPC client writes the address it cannot dial (an invalid escape kept, and a byte that is not UTF-8 written as Latin-1 or as �), and escaped, as a JSON line or a quoted error writes it. A user and a password are masked wherever they come; a user alone only where it starts a word, so another address's user that ends in it is kept. The configuration the agent logs at start (backends loaded, requested backends) masks the URL as it masks any URL in its configuration (see Secrets management): a user alone written without a scheme or a port, as token@collector, reads there as an e-mail address and is shown, and so is the user before a password that holds a space. The backend's command line still carries the URL as written, and any user of the host can read it there, with ps for example.

Backend keys

Each backend key enables that backend. An empty value (no sub-keys) uses all defaults. All discovery backends, snmp_telemetry and gnmi_telemetry accept optional host and port overrides.

A backend left without a port on a loopback host, such as localhost (the default), 127.0.0.1 or ::1, is given a port that is free on every address of that host, picked again each time it starts, so several agents can share one host network (network_mode: host). The agent logs the port in the backend's startup line: --port, or -p for pktvisor and --server_port for opentelemetry_infinity. A backend whose host is not loopback, such as 0.0.0.0, keeps the fixed port in the table below, since whatever reaches it there has to know the port. Set port to fix the port in either case.

Under the fleet config manager, the OTLP bridge the backends export to follows the same rule: while otlp_bridge_bind_host is loopback (the default), otlp_bridge_grpc_port and otlp_bridge_http_port default to free ports, kept for as long as the agent runs, and to 4317 and 4318 when the bind host exposes the bridge.

Every backend, these and pktvisor and opentelemetry_infinity alike, is refused before it is spawned when another process already holds the host:port it would listen on, with an error naming the address. Its readiness check asks that address and would otherwise take the other process's answer as its own. With a fixed port, that happens when two agents share a host network with the same backend ports, or when a backend process from an earlier run of the agent still holds its port. Give each agent its own ports in the first case; end the leftover process in the second. A backend on a picked port starts beside such a leftover process instead of being refused, so the leftover keeps running until it is ended.

KeyBackendFixed portNotes
device_discoveryNAPALM-based device discovery8072Optional host/port overrides
snmp_discoverySNMP-based discovery8070Optional host/port overrides
network_discoveryNetwork/port scan discovery8073Optional host/port overrides
gnmi_discoverygNMI-based discovery8075Optional host/port overrides. See gNMI Discovery docs
workerCustom worker backend8071Optional host/port overrides
pktvisorpktvisor packet analytics10853See pktvisor docs
opentelemetry_infinityOpenTelemetry Infinity10222See OTel Infinity docs
snmp_telemetrySNMP metrics and traps8078Optional host/port overrides; requires common.otlp.grpc. See SNMP Telemetry docs
gnmi_telemetrygNMI streaming telemetry metrics8079Optional host/port overrides; requires common.otlp.grpc. See gNMI Telemetry docs

orb.policies

Defines policies inline. Only used when config_manager.active: local. Each top-level key matches a backend name; beneath it, each named entry is an independent policy.

orb:
  policies:
    device_discovery:
      my_policy:
        config:
          schedule: "0 * * * *"
          defaults:
            site: New York NY
        scope:
          - hostname: 192.168.0.5
            username: admin
            password: ${PASS}
            driver: ios
    network_discovery:
      scan_policy:
        config:
          schedule: "0 */2 * * *"
        scope:
          targets: [192.168.1.0/24]

Policy names

The key beneath a backend is the policy name. my_policy and scan_policy above are names, not reserved words.

  • Forwarded verbatim. Nothing along the path slugifies, trims or case-folds the name, and it is the name that appears in backend status and in telemetry.
  • Spaces and non-ASCII are supported. My Office Network #2 and café are valid. The agent percent-escapes the name when it addresses the policy over the backend's API, so #, ? and % are safe to use.
  • A name must not contain /. It is the one character escaping cannot carry: the backend decodes the escape before routing, so the name would address a different policy. The agent refuses such a policy at apply time and reports it as failed, rather than starting one it could never remove.
  • Must be distinct within a backend. The name is a YAML mapping key, and a duplicate key is a YAML error, so the agent rejects the whole configuration file rather than starting with one of the two.
  • Best kept distinct across backends too. The agent indexes policies by name alone, so the same name under two backends can attach one policy's dataset IDs to the other's telemetry.

For the full list of parameters per backend, see:


orb.secrets_manager

Configures an external secrets source. When active, ${<scheme>://...} references in policy and config values are resolved at runtime against the selected backend.

Supported backends (set one in active):

activeBackendPlaceholder schemeDocs
vaultHashiCorp Vault (KV v2)${vault://...}Vault
delineaDelinea Secret Server${delinea://...}Delinea
dopplerDoppler${doppler://...}Doppler
cyberarkCyberArk PAM (Central Credential Provider)${cyberark://...}CyberArk
dsvDelinea DevOps Secrets Vault${dsv://...}DSV
fleetFleet (NetBox Labs cloud)--

Vault

Three placeholder grammars are supported, in priority order:

  • Fully qualified - ${vault://<mount>//<path>/<key>}. The // separator delimits the mount, so multi-segment mounts (e.g. foo/bar) work unambiguously.
  • Short form - ${vault://<path>/<key>}. Requires sources.vault.mount to be configured; the configured mount is used.
  • Legacy - ${vault://<mount>/<path>/<key>}. Single-segment mount only; preserved for backward compatibility with placeholders that pre-date the // separator.

Single-segment mount, legacy form:

password: ${vault://kv/myapp/db/password}

Single-segment mount, qualified form (recommended for new configs):

password: ${vault://kv//myapp/db/password}

Multi-segment mount - only the qualified form parses correctly:

password: ${vault://foo/bar//myapp/db/password}
orb:
  secrets_manager:
    active: vault
    sources:
      vault:
        address: "https://vault.example.com:8200"
        auth: token
        auth_args:
          token: ${VAULT_TOKEN}
        schedule: "*/5 * * * *"

See the full Vault secrets manager documentation for all parameters and authentication methods.

Doppler

Doppler placeholders take a short form (using project/config defaults from the agent config) or a fully qualified form:

# Short form — uses sources.doppler.project and sources.doppler.config defaults
password: ${doppler://API_KEY}

# Fully qualified — useful with Service Account / Personal tokens spanning configs
password: ${doppler://orb/prd/API_KEY}
orb:
  secrets_manager:
    active: doppler
    sources:
      doppler:
        token: ${DOPPLER_TOKEN}
        project: orb
        config: prd
        schedule: "*/5 * * * *"

See the full Doppler secrets manager documentation for all parameters, authentication, and change-detection semantics.

CyberArk

CyberArk placeholders take a short form (using the AppID default from the agent config) or a fully qualified form, with an optional field selector for non-password fields:

# Short form — returns the Content (password) field
password: ${cyberark://<Safe>/<Object>}

# Short form with field selector
username: ${cyberark://<Safe>/<Object>/UserName}

# Fully qualified, overriding the configured AppID
password: ${cyberark://<AppID>//<Safe>/<Object>}
orb:
  secrets_manager:
    active: cyberark
    sources:
      cyberark:
        url: https://ccp.corp.example.com
        app_id: orb-agent
        client_cert: /opt/orb/secrets/orb.crt
        client_key:  /opt/orb/secrets/orb.key
        schedule: "*/5 * * * *"

See the full CyberArk secrets manager documentation for all parameters and authentication options.

DSV

Delinea DevOps Secrets Vault placeholders reference a secret path plus a key in the secret's data map (split on the last /):

password: ${dsv://servers/prod-db/password}
orb:
  secrets_manager:
    active: dsv
    sources:
      dsv:
        tenant: acme
        client_id: ${DSV_CLIENT_ID}
        client_secret: ${DSV_CLIENT_SECRET}
        schedule: "*/5 * * * *"

See the full DSV secrets manager documentation for all parameters and authentication.

Plain ${VAR_NAME} references are not resolved by the secrets manager - those are handled by environment variable substitution as described below.


Environment Variable Substitution

Values can reference environment variables using ${VAR_NAME} syntax. Resolution is handled at different layers depending on the field:

ScopeSupported fieldsResolved by
Git config managerurl, passwordGo agent at startup
Vault secrets manager auth_argsAll fieldsGo agent at startup
CyberArk secrets managerurl, app_id, reason, ca_bundle, client_cert, client_keyGo agent at startup
device_discovery policy (all fields)Any string value in scope and defaultsPython backend at policy execution
snmp_discovery policy authenticationcommunity, username, auth_passphrase, priv_passphrase, context_nameGo SNMP backend at policy execution
snmp_telemetry policy authenticationcommunity, username, auth_passphrase, priv_passphrase, only for variables named in backends.snmp_telemetry.policy_env_vars; unset refuses every referenceGo SNMP telemetry backend at policy execution
gnmi_telemetry policy credentialsusername, password, tls.ca, tls.cert, tls.key, only for variables named in backends.gnmi_telemetry.policy_env_vars; unset refuses every referenceGo gNMI telemetry backend at policy execution
# Git config (resolved by Go agent)
password: ${GIT_TOKEN}

# device_discovery policy scope (resolved by Python backend)
scope:
  - hostname: 192.168.0.5
    username: admin
    password: ${DEVICE_PASS}

For fields not listed above (e.g. network_discovery scope), use the Vault secrets manager to inject values at runtime.

On this page