Telegraf net/http

Hi all!!
After installing telegraf on my target host i still got the same error : net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)

Hello @Annonyme1,
Can you please share your telegraf config?
Also, can you please change debug=True in your config and share the full logs?
Thanks you!


2020-05-19T15:39:09Z I! Starting Telegraf 1.12.2
2020-05-19T15:39:09Z I! Using config file: /etc/telegraf/telegraf.conf
2020-05-19T15:39:09Z I! Loaded inputs: cpu disk diskio kernel mem processes system net swap
2020-05-19T15:39:09Z I! Loaded aggregators:
2020-05-19T15:39:09Z I! Loaded processors:
2020-05-19T15:39:09Z I! Loaded outputs: influxdb
2020-05-19T15:39:09Z I! Tags enabled: host=zoneminder
2020-05-19T15:39:09Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:“zoneminder”, Flush Interval:10s
2020-05-19T15:39:09Z D! [agent] Initializing plugins
2020-05-19T15:39:09Z D! [agent] Connecting outputs
2020-05-19T15:39:09Z D! [agent] Attempting connection to [outputs.influxdb]
2020-05-19T15:39:09Z D! [agent] Successfully connected to outputs.influxdb
2020-05-19T15:39:09Z D! [agent] Starting service inputs
2020-05-19T15:39:25Z E! [outputs.influxdb] when writing to [http://grafana.s.com:8086]: Post http://grafana.sifast.com:8086/write?db=infra: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
2020-05-19T15:39:25Z D! [outputs.influxdb] Buffer fullness: 49 / 10000 metrics
2020-05-19T15:39:25Z E! [agent] Error writing to outputs.influxdb: could not write any address

This means Telegraf couldn’t connect to the InfluxDB, there was no response from the server so maybe a firewall is blocking packets.

Firewalld is disabled and for Fortigate firewall i set a rule to open allow on port 8086