How to use subnet in hosts field of metricbeat modules

Would like to use subnet of hosts for collecting metrics from Prometheus exporter instead of list of IP's in hosts collection.

currently it supports

metricbeat.modules:
- module: prometheus
  period: 10s
  metricsets: ["collector"]
  hosts: ["172.0.0.7:9109"]
  metrics_path: /metrics

But would like to use something like below

metricbeat.modules:
# Metrics collected from a Prometheus endpoint
- module: prometheus
  period: 10s
  metricsets: ["collector"]
  hosts: ["172.0.0.0/16:9109"]
  metrics_path: /metrics

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.