I watched a lot of videos and read a lot of configuration articles but I couldn’t connect telegraf to influxdb. two or three years ago I was creating a bucket in influxdb then creating telegraf and after editing the telegraf config file corretly, exporting the token, running the given command in terminal and pressing the verify connection button, the connection was made. that was easy like that.
I don’t know what changed but I know very clearly that the connection cannot be established.
connection is open as I understand,
curl -sL -I localhost:8086/ping
HTTP/1.1 204 No Content
Vary: Accept-Encoding
X-Influxdb-Build: OSS
X-Influxdb-Version: v2.7.11
Date: Wed, 22 Jan 2025 20:43:04 GMT
here is my telegraf config :
###############################################################################
# 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"]
# ## Local address to bind when connecting to the server
# ## If empty or not set, the local address is automatically chosen.
local_address = "127.0.0.1:8086"
#
# ## Token for authentication.
token = "lzfzsdCcQec-aSh99TgzExYyiGcueGL8R-BVjkWKTPAjYdGEQhGXPi7z2RepVqB9AIL0lzmL87IY5iZ8pAYCcw=="
#
# ## Organization is the name of the organization you wish to write to.
organization = "Home"
#
# ## Destination bucket to write into.
bucket = "cem"
influxdb and telegraf systemd services are running without any problems.
there is something wrong but I couldn’t find it.