This document lists environment variables currently recognized by LLDP-Runner. It separates configuration overrides, seed inputs, credentials, and terminal behavior because they have different precedence and scope.
For normal configuration values, precedence is:
defaults.py
-> primary TOML, @include, and conf.d
-> LLDP_RUNNER_* environment overrides
-> repeatable --set overrides
-> dedicated command-line options
Runtime SNMP credential variables are used only when explicit credential profiles are not already defined by configuration.
LLDP_RUNNER_CONFIGSelect the primary TOML configuration when --config is not supplied.
export LLDP_RUNNER_CONFIG=/opt/lldp-runner/config.toml
lldp-runner validate-configAn explicit --config takes precedence. An explicit path from either source is authoritative and must exist.
This variable applies to commands that load runtime configuration, including run, get-neighbors, validate-config, explain-target, status, watch, clean, and pause. The version subcommand and --version do not load runtime configuration.
generate-config does not use an existing primary configuration as its input; it starts from built-in defaults plus supported generation overrides.
These variables overlay the matching configuration settings.
LLDP_RUNNER_ROOTOverride paths.persistent_root.
export LLDP_RUNNER_ROOT=/srv/lldp-runnerOperational effect is primarily on full discovery and commands that resolve run storage. Single-device inspect deliberately skips persistent-path probing.
LLDP_RUNNER_SCRATCH_ROOTOverride paths.scratch_root.
export LLDP_RUNNER_SCRATCH_ROOT=/dev/shm/lldp-runnerrun, status, watch, clean, and pause use the scratch root. Inspect does not create or probe discovery scratch storage. clean resolves the configured scratch namespace without credential processing and removes only recognized LLDP-Runner historical scratch artifacts.
LLDP_RUNNER_WORKERSOverride discovery.workers.
Accepted values are a positive integer or auto.
export LLDP_RUNNER_WORKERS=autoauto resolves to (os.cpu_count() or 1) * 4 on the running host.
LLDP_RUNNER_BATCH_SIZEOverride discovery.batch_size.
export LLDP_RUNNER_BATCH_SIZE=9LLDP_RUNNER_SEED_ORDEROverride discovery.seed_order.
Accepted values are input, sorted, and random.
export LLDP_RUNNER_SEED_ORDER=randomLLDP_RUNNER_SEED_DNS_MODEOverride discovery.seed_dns_mode.
Accepted values are resolve and skip-addressed.
export LLDP_RUNNER_SEED_DNS_MODE=skip-addressedskip-addressed applies only to eligible startup seeds. It does not disable DNS enrichment for learned managed neighbors. See DNS.md.
LLDP_RUNNER_SHUFFLE_KEYSet the reproducible key used by random seed ordering.
export LLDP_RUNNER_SHUFFLE_KEY=20260821When random ordering is selected and this value is absent, a new key is generated for a new run and persisted for resume.
LLDP_RUNNER_LIMIT_BEHAVIOROverride discovery.limit_behavior.
Accepted values are pause and complete.
export LLDP_RUNNER_LIMIT_BEHAVIOR=completeLLDP_RUNNER_BOUNDARIESReplace discovery.boundaries with a comma-separated CIDR list.
export LLDP_RUNNER_BOUNDARIES='192.0.2.0/24,2001:db8:1::/48'For recursive run, these boundaries control which addresses may be queried. For get-neighbors, the explicit target may be outside the boundary, but the result reports the boundary decision.
LLDP_RUNNER_MAX_DEVICESOverride discovery.max_devices.
Accepted values are a non-negative integer or auto.
export LLDP_RUNNER_MAX_DEVICES=20
export LLDP_RUNNER_MAX_DEVICES=0
export LLDP_RUNNER_MAX_DEVICES=autoA positive value is a recursive managed-device guardrail. 0 is unlimited. auto enables seed-only polling and suppresses recursive neighbor queries.
LLDP_RUNNER_MAX_HOSTSOverride discovery.max_hosts.
LLDP_RUNNER_LATE_ADDRESS_RECOVERY_ATTEMPTSOverride discovery.late_address_recovery_attempts. The value is an integer from 0 through 3. The default is 1; 0 disables failed-host admission from later direct, policy-permitted, previously unattempted management addresses. This setting does not change SNMP retry budgets.
export LLDP_RUNNER_MAX_HOSTS=10000 disables the identified-host count guardrail.
LLDP_RUNNER_SNMP_BACKENDOverride snmp.backend. Accepted values are gufo and pysnmp; PySNMP is the built-in default. Existing Gufo runs still require an explicit effective Gufo selection when resumed.
export LLDP_RUNNER_SNMP_BACKEND=pysnmp--set can override this environment value, and the dedicated --snmp-backend option has final ordinary-setting precedence. The effective backend is fixed before discovery and persisted for resume. This variable never requests automatic fallback or mixed-backend operation.
LLDP_RUNNER_SNMP_TIMEOUTOverride snmp.timeout_seconds.
export LLDP_RUNNER_SNMP_TIMEOUT=2.0This is a per-request SNMP timeout, not a whole-device timeout.
LLDP_RUNNER_SNMP_RPSOverride snmp.per_device_rps.
export LLDP_RUNNER_SNMP_RPS=5.0LLDP_RUNNER_SNMP_MAX_OUTSTANDINGOverride snmp.max_outstanding_devices_per_worker.
export LLDP_RUNNER_SNMP_MAX_OUTSTANDING=24This primarily affects full discovery worker concurrency. The inspect path uses the same worker primitives but only supplies one device.
LLDP_RUNNER_ICMP_TIMEOUTOverride icmp.timeout_seconds.
export LLDP_RUNNER_ICMP_TIMEOUT=1.0This affects normal discovery and real single-device inspection when ICMP is enabled.
LLDP_RUNNER_LOG_LEVELOverride logging.level.
export LLDP_RUNNER_LOG_LEVEL=DEBUGFor get-neighbors, diagnostics are written to stderr so stdout remains usable for redirected table, detail, CSV, or JSON data.
LLDP_RUNNER_SNAPSHOT_INTERVALOverride output.snapshot_interval_seconds.
export LLDP_RUNNER_SNAPSHOT_INTERVAL=120This applies to full discovery snapshots.
LLDP_RUNNER_SCOREBOARD_INTERVALOverride output.scoreboard_interval_seconds.
export LLDP_RUNNER_SCOREBOARD_INTERVAL=3This applies to full discovery scoreboard refreshes.
The following variables are additive seed sources for lldp-runner run. They do not apply to get-neighbors, which accepts one explicit target.
LLDP_RUNNER_SEEDSProvide inline seeds separated by commas and/or newlines.
export LLDP_RUNNER_SEEDS='core1.example.net,core2.example.net'LLDP_RUNNER_SEED_FILESProvide a platform path-list of seed files. On Linux, entries are separated by : because the parser uses os.pathsep.
export LLDP_RUNNER_SEED_FILES='/srv/seeds/core.txt:/srv/seeds/edge.csv'CSV files must use the current strict seeds.csv schema. Other files use the plain-text seed parser.
LLDP_RUNNER_SEED_DIRSProvide a platform path-list of recursively scanned seed directories.
export LLDP_RUNNER_SEED_DIRS='/opt/lldp-runner/seeds.d:/srv/extra-seeds'Seed-directory skip and parsing rules are described in CLI.md.
These variables provide the lowest-priority default credentials for small or simple runs that do not define explicit credential profiles.
SNMPCOMMProvide the default SNMPv2c community string.
export SNMPCOMM='example-community'SNMPUSERProvide the SNMPv3 authPriv username.
SNMPAUTHProvide the SNMPv3 authentication password.
SNMPPRIVProvide the SNMPv3 privacy password.
All three v3 variables are required together.
export SNMPUSER='snmp-user'
export SNMPAUTH='authentication-password'
export SNMPPRIV='privacy-password'When both v2c and v3 credentials are present, snmp.version determines the primary version and the other becomes fallback. When only one version is available, LLDP-Runner uses that credential for two attempts rather than creating a duplicate fallback credential.
Explicit TOML credentials and credential profiles take precedence and suppress synthesis of the runtime-default credential profile.
Explicit TOML credential entries may refer to site-defined environment-variable names rather than embedding secrets in the file.
Example:
[credentials.site-v3]
version = "v3"
username_env = "SITE_SNMP_USER"
auth_password_env = "SITE_SNMP_AUTH"
priv_password_env = "SITE_SNMP_PRIV"The names SITE_SNMP_USER, SITE_SNMP_AUTH, and SITE_SNMP_PRIV are examples; any environment-variable names may be configured in these fields.
The same concept applies to an SNMPv2c community_env field.
Credential command-line arguments use an environment-name-first rule.
export SITE_COMM='example-community'
get-neighbors --community SITE_COMM core1.example.netBecause SITE_COMM exists, its contents become the community string.
If no environment variable named by the token exists, the token itself is used literally:
get-neighbors --community literal-community core1.example.netEnvironment-variable names are preferable for secrets because literal command-line values may appear in shell history or process listings.
NO_COLORWhen present in the environment, disable terminal color/styling in get-neighbors, show-neighbors, and the interactive watch dashboard.
NO_COLOR=1 get-neighbors core1.example.netHuman output is also automatically colorless when stdout is not a TTY. CSV and JSON output never contain ANSI color codes.
Terminal styling is configured under [terminal], not through additional LLDP_RUNNER_* environment variables. color = "auto" enables styling only when terminal capabilities permit it; color = "never" disables styling. palette = "dark" (default) or "light" selects the built-in watch dashboard theme. The existing named semantic colors configure neighbor-oriented output.
The shipped example is:
configs/conf.d/terminal-colors.toml.example
Supported names are black, red, green, yellow, blue, magenta, cyan, white, default, and none. default selects the terminal default foreground color. none leaves that semantic role uncolored while preserving applicable emphasis when styling is enabled. NO_COLOR remains authoritative over all configured color and palette choices.
LLDP-Runner also relies on normal operating-system behavior for items such as home-directory expansion and executable lookup. For example, the invoking user's home directory determines ~ in config and path search locations.
These are not LLDP-Runner-specific configuration variables and are therefore not part of the supported LLDP_RUNNER_* interface.