iPerf3 exporter is configured via command-line flags.
To view all available command-line flags, run iperf3_exporter -h.
The timeout of each probe is automatically determined from the scrape_timeout in the Prometheus config. This can be also be limited by the iperf3.timeout command-line flag. If neither is specified, it defaults to 30 seconds.
Prometheus Configuration
The iPerf3 exporter needs to be passed the target as a parameter, this can be done with relabelling. Optional: pass the port that the target iperf3 server is lisenting on as the "port" parameter.
Example config:
scrape_configs:
- job_name: iperf3
metrics_path: /probe
static_configs:
- targets:
- foo.server
- bar.server
params:
port: ['5201']
relabel_configs:
- source_labels: [__address__]
target_label: __param_target
- source_labels: [__param_target]
targetlabel: instance
- targetlabel: __address
replacement: 127.0.0.1:5201 # The iPerf3 exporter's real hostname:port.
|