table of contents
| nbox-export(1) | General Commands Manual | nbox-export(1) |
NAME¶
nbox-export - Structured read-only exports (e.g. Prometheus service-discovery JSON). Query NetBox via the read engine and emit a fixed structured shape to stdout — distinct from the presentation-oriented JSON/CSV view layer
SYNOPSIS¶
nbox export [-h|--help] <subcommands>
DESCRIPTION¶
Structured read-only exports (e.g. Prometheus service-discovery JSON). Query NetBox via the read engine and emit a fixed structured shape to stdout — distinct from the presentation-oriented JSON/CSV view layer
OPTIONS¶
- -h, --help
- Print help
SUBCOMMANDS¶
- nbox-export-prometheus-sd(1)
- Emit Prometheus file-based service-discovery JSON (`[{"targets": ["ip:port"], "labels": {...}}]`) for IPs in a prefix or carrying a tag. Targets are grouped by device; labels carry device/site/role/status/tags. Pipe the output straight to a file Prometheus scrapes (`prometheus-sd.json` in its `file_sd_configs`)
- nbox-export-address-list(1)
- Emit a firewall/blocklist address list — the CIDRs of IPs assigned in a prefix, or the IPs *and* prefixes carrying a tag. Host IPs render as `/32` (`/128`); `--summarize` aggregates contiguous entries into the minimal covering set. Default output is a JSON array of CIDR strings; `--format plain` is newline-delimited for ipset/nftables/pf includes
- nbox-export-device-inventory(1)
- Emit a device inventory — one record per device (name, status, role, site, model, platform, serial, asset tag, rack, primary IP, tenant, tags), filtered by any combination of `--site` / `--role` / `--tag` / `--status` / `--manufacturer` (all by slug/value, ANDed). Default output is a JSON array; `--format csv` emits a spreadsheet-ready table
| export |