I have a Opnsense instance running behind a WireGuard Tunnel. The issue is, that telegraf binds automatically to WG0 interface which is not part of the encrypted traffic and gets dropped.
Is there a way to set the local_address mentioned in the release notes: https://docs.influxdata.com/telegraf/v1/release-notes/
Thanks
P.S.
I'm using:
os-telegraf (installed) 1.12.13
https://github.com/influxdata/telegraf/tree/master/plugins/outputs/influxdb_v2
---
You can create a default config by using "telegraf config >/tmp/telegraf.conf". It shows:
###############################################################################
# OUTPUT PLUGINS #
###############################################################################
# # Configuration for sending metrics to InfluxDB 2.0
# [[outputs.influxdb_v2]]
# ## The URLs of the InfluxDB cluster nodes.
# ##
# ## Multiple URLs can be specified for a single cluster, only ONE of the
# ## urls will be written to each interval.
# ## ex: urls = ["https://us-west-2-1.aws.cloud2.influxdata.com"]
# urls = ["http://127.0.0.1:8086"]
#
# ## Local address to bind when connecting to the server
# ## If empty or not set, the local address is automatically chosen.
# # local_address = ""
#
# ## Token for authentication.
# token = ""
#
# ## Organization is the name of the organization you wish to write to.
# organization = ""
#
# ## Destination bucket to write into.
# bucket = ""
#
# ## The value of this tag will be used to determine the bucket. If this
...
I assume you must specify an IP.
However, there is no provision in the OpnSense UI to specify that, so you can open a feature request on Github to add an input.
Thanks for your reply. Need to figure out why I can' t bind the address tough:
E! [agent] Error writing to outputs.influxdb_v2: Post "http://xxxx.2:8086/api/v2/write?bucket=opnsense&org=Proxmox": dial tcp yyy.1:0->xxx.2:8086: bind: can't assign requested address
Edit: got it working . Thanks