When metrics should go to two InfluxDB 1.x destinations through different proxies, declare two output instances:

[[outputs.influxdb]]
  alias = "primary_metrics"
  urls = ["https://metrics-a.example:8086"]
  database = "observations"
  http_proxy = "http://proxy-a.example:3128"

[[outputs.influxdb]]
  alias = "secondary_metrics"
  urls = ["https://metrics-b.example:8086"]
  database = "observations"
  http_proxy = "http://proxy-b.example:3128"

This is an output fragment for an existing Telegraf configuration. Supply the actual endpoints and retain each destination’s required authentication and TLS settings. When a destination is publicly reachable and a public-proxy route is permitted, the HTTP proxy list offers candidates for its http_proxy value; the chosen proxy must allow that destination host and port.

Without filters selecting different metrics, both output instances receive the eligible metric stream. This is intentional duplicate delivery to two targets.

A single outputs.influxdb instance with several entries in urls has another meaning. The plugin documents those as alternatives for one cluster and writes to only one URL during an interval. It does not send a copy to every URL.

Each http_proxy belongs to its output instance and is a single proxy override, not a list to rotate. The InfluxDB destination still comes from urls. Separate output instances therefore express two destinations and two routes directly, while output filters can be added when the intended streams differ.

متعلقہ مضامین