influxdata / influxdata/telegraf

Bind to specific output network interface and/or IP

Open
#9,896 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature request
Dominant language
Go
Stars
17.8k
Forks
5.8k
Avg merge
1d 20h
Merged PRs (30d)
161

Description

Feature Request

For systems with multiple network interfaces (e.g., eth0 and VPN tun0) it could happen that Telegraf takes the wrong one, because sometimes the default routing is not the correct for Telegraf.

Proposal:

It should be possible to specify which network IP or network interface Telegraf should be using.

Current behavior:

Output plugin, e.g., InfluxDB, uses the first/default routing interface.

Desired behavior:

A configuration option "bind" or "interface" should be introduced allowing to specify which specific network interface "e.g., "tun0") or IP address Telegraf should be using.

Use case:
  • Normally, Telegraf (LAN, Raspi) is sending metrics to an InfluxDB (Internet, VPS).
  • However, sometimes I activate a VPN on the Raspi. Then there's an additional network interface (e.g., tun0) which becomes the default network gateway/routing.
  • But, the VPS accepts only certain IPs (from my local network).
  • So, Telegraf is collecting, it's sending, via tun0, but because this has the VPN IP, the collected data does not arrive the InfluxDB (on VPS) because of IP restrictions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No implementation files or tests are named. Start by tracing how the InfluxDB output plugin establishes connections and reads configuration, then determine whether binding should apply to that output or to outputs generally. Done means a configuration option can select an interface or IP and the selected route is used reliably, with coverage for the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.