table of contents
| nbox-export-prometheus-sd(1) | General Commands Manual | nbox-export-prometheus-sd(1) |
NAME¶
nbox-export-prometheus-sd - 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`)
SYNOPSIS¶
nbox export prometheus-sd [--prefix] [--tag] [--vrf] [--port] [-h|--help]
DESCRIPTION¶
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`)
OPTIONS¶
- --prefix <CIDR>
- Source prefix in CIDR notation. IPs assigned within the prefix become targets. Mutually exclusive with `--tag`
- --tag <SLUG>
- Source tag slug (or name): IPs carrying this tag become targets. Mutually exclusive with `--prefix`
- --vrf <VRF>
- Disambiguate the prefix by VRF (name, slug, or RD) when the CIDR exists in more than one VRF. Ignored with `--tag`
- --port <PORT> [default: 9100]
- Scrape target port. Defaults to 9100 (the conventional `node_exporter` port)
- -h, --help
- Print help
| prometheus-sd |