Unable to connect Telegraf from remote computers

I have installed Telegraf on a remote server and get a 403 error in the logs when I start the service. I am able to connect to the UI from that same server. Not seeing any other errors with this setup that would block or reject this. I have tried with both the all access token and the telegraf token that was created.

2022-09-27T21:33:23Z E! [outputs.influxdb_v2] When writing to [http://10.11.0.9:8086]: failed to write metric to Bucket_NAME (403 Forbidden): 403 Forbidden
2022-09-27T21:33:23Z E! [agent] Error writing to outputs.influxdb_v2: failed to send metrics to any configured server(s)

These are the errors I’m getting when I try to connect with telegraf

Hi @mboyd_sap,
Welcome to the community! Could you send your config? It could be down to your token and org definition.

Thanks,
Jay

=============================================================

Config Name… telegraf_distributed_engines

Version… 0.11

Created by… D073495 on Oct-22, 2021

Changed by… D073495 on May-09, 2022

=============================================================

=============================================================

TELEGRAF AGENT

=============================================================

[agent]
interval = “10s”
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = “0s”
flush_interval = “10s”
flush_jitter = “0s”
precision = “”
debug = false
quiet = false
omit_hostname = false
logfile = “/Program Files/Telegraf/telegraf.log”
logfile_rotation_max_size = “5MB”
logfile_rotation_max_archives = 5

=============================================================

OUTPUT PLUGIN

=============================================================

[[outputs.influxdb_v2]]
urls = [“http://10.11.0.9:8086”]
token = “$INFLUX_TOKEN”
organization = “Concur”
bucket = “Thycotic”

=============================================================

INPUT PLUGIN

=============================================================

[[inputs.cpu]]
percpu = true
totalcpu = true
collect_cpu_time = false
report_active = false
[[inputs.disk]]
ignore_fs = [“tmpfs”, “devtmpfs”, “devfs”, “overlay”, “aufs”, “squashfs”]
[[inputs.diskio]]
[[inputs.mem]]
[[inputs.net]]
[[inputs.swap]]
[[inputs.system]]
[[inputs.win_services]]
[[inputs.win_perf_counters.object]]
ObjectName = “Process”
Counters = [“% Processor Time”,“Working Set - Private”]
Instances = [“Thycotic.DistributedEngine.Service”]
Measurement = “thycotic.websvc”

[[inputs.win_perf_counters.object]]
ObjectName = “Process”
Counters = [“% Processor Time”,“Working Set - Private”]
Instances = [“*”]
Measurement = “win_process”

Hi @mboyd_sap,
Can you try adding your token directly into your config before using environment variables? This might be the root cause of the issue where the config is not picking up the token.

We have tired putting the token in the file both the all access and the limited telegraf token but we still get the same error message.

Hi @mboyd_sap,
The log is still unusual as it shows this as your bucket name: Bucket_NAME. Which is inconsistent with your config. Other than that there could be an issue with firewalls on either side blocking outgoing or incoming. Though my bets it’s still an issue with the config. Could you give the fresh log for running your config with an all access token using the following command:

telegraf --debug --config ./telegraf.conf

Do you also have only one ORG within your InfluxDB instance?