'telegraf output plugin http error with TDengine

I'm working on a monitoring system to retrieve hardware metric by telegraf and store the time-series data to TDengine.

But seem the data insertion is very slow even making telegraf reject to work anymore.

I got error msg like following:

2021-12-28T11:36:14Z W! [agent] ["outputs.http"] did not complete within its flush interval

2021-12-28T11:36:23Z E! [agent] Error writing to outputs.http: Post "http://xxxxxx:6041/influxdb/v1/write?db=bmc": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

2021-12-28T11:36:35Z W! [agent] ["outputs.http"] did not complete within its flush interval

2021-12-28T11:36:43Z E! [agent] Error writing to outputs.http: Post "http://xxxxxx:6041/influxdb/v1/write?db=bmc": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

2021-12-28T11:37:02Z W! [agent] ["outputs.http"] did not complete within its flush interval

2021-12-28T11:37:07Z E! [agent] Error writing to outputs.http: Post "http://xxxxxx:6041/influxdb/v1/write?db=bmc": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

2021-12-28T11:37:08Z W! [outputs.http] Metric buffer overflow; 7824 metrics have been dropped

2021-12-28T11:37:21Z W! [agent] ["outputs.http"] did not complete within its flush interval

2021-12-28T11:37:28Z E! [agent] Error writing to outputs.http: Post "http://xxxxxxxx:6041/influxdb/v1/write?db=bmc": context deadline exceeded (Client.Timeout exceeded while awaiting headers)

2021-12-28T11:37:28Z W! [outputs.http] Metric buffer overflow; 14363 metrics have been dropped

Does anyone know how to tune TDengine to work better performance?



Solution 1:[1]

Edit /etc/taos/taosadatper.toml and add following lines:

debug = true
port = 6041
logLevel = "debug"

Solution 2:[2]

It may caused by telegraf http plugin, use it like this:

[[outputs.http]]
  url = "${TDENGINE_API}/influxdb/v1/write?db=${TDENGINE_METRICS_DATABASE}"
  method = "POST"
  timeout = "5s"
  username = "${TDENGINE_USER}"
  password = "${TDENGINE_PASS}"
  data_format = "influx"
  influx_max_line_bytes = 250

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Shuduo
Solution 2 zitsen