Discover exporters from Prometheus service discovery
prometheus-sd is the default source.
It reads a bare JSON array of {targets, labels} objects, the contract many systems already publish for Prometheus to scrape.
Nothing needs installing unless the producer is NetBox, where the netbox-plugin-prometheus-sd plugin serves the document.
Prerequisites
| Requirement | Detail |
|---|---|
| An endpoint serving a Prometheus HTTP SD document | A bare array, no envelope. Each target is host or host:port; a NetBox device's target is its name. |
| An address per device | From the first present label in riptide.discovery.address-labels (default __meta_netbox_primary_ip4, then __meta_netbox_primary_ip6), else the target's host when it parses as an address. |
| A token, if the endpoint needs one | Stored where a secret reference resolves it. |
| An internal CA, if the endpoint uses one | In riptide.http.ca-bundle, see Outbound TLS. |
No exporters tree in the inventory file | Discovery owns that tree. |
Steps
-
Point
riptide.discovery.urlat the document in/etc/riptide/config.yaml. The example is the NetBox plugin endpoint; a producer that is not NetBox needsaddress-labelsset to whichever label carries its address, or no label at all when the target itself is the address.riptide:discovery:url: https://netbox.example.com/api/plugins/prometheus-sd/devices/token: vault://secret/netbox#tokeninterval: 60sinventory:file: /etc/riptide/inventory.yamltypemay stay unset; it defaults toprometheus-sd.filteris ignored by this source: the producer filters, so bound the NetBox plugin with its own query, for example?status=active&role=leaf&role=spineon the URL. -
Reduce
/etc/riptide/inventory.yamlto agent ranges only.riptide:snmp:agents:"10.20.0.0/16":credentials: corp-v3polling: default -
Restart the collector and read the inventory line.
journalctl -u riptide -n 200 | grep -E 'Inventory|Boot could not reach'Expected output:
2026-09-23T14:40:36.702+02:00 INFO 23264 --- [ main] org.riptide.inventory.Inventory : Inventory loaded from /etc/riptide/inventory.yaml + https://netbox.example.com/api/plugins/prometheus-sd/devices/: 1 agent ranges, 2 enrichment entries2026-09-23T14:40:36.761+02:00 INFO 23264 --- [ main] o.riptide.config.InventoryFileReloader : Inventory hot-reload enabled: watching /etc/riptide/inventory.yaml + https://netbox.example.com/api/plugins/prometheus-sd/devices/ every PT1M -
Verify the gauges on the management port.
curl -s http://localhost:8080/metrics | grep -E '^(discovery_|inventory_reload_)'Expected output:
discovery_skipped 1.0discovery_targets 2.0inventory_reload_dead 0.0inventory_reload_stale 0.0inventory_reload_failures 0.0inventory_reload_successes 0.0The document behind this run held three devices, one of them with no
__meta_netbox_primary_ip4label and a name for a target, so it was skipped and counted.
Related
- Discovery reference: every key and every message.
- How discovery composes the inventory: how a target becomes an exporter, and what the plugin endpoint costs per poll.
- Discover exporters from NetBox: the reader to prefer for NetBox when the plugin is not already in place.
Open questions
- The output above was captured on 2026-09-23 against a local stand-in serving a three-entry service discovery document, not against the NetBox plugin; the inventory path and the URL in the quoted lines were substituted for the stand-in's.
journalctlwas not run; the lines were read from the collector's stdout.