## 配置 Telegraf 配置方法,在 `/etc/telegraf/telegraf.conf` 增加如下配置,其中 `database name` 请填写希望在 TDengine 保存 Telegraf 数据的数据库名,`TDengine cluster host`、`username` 和 `password` 填写 TDengine 集群中的实际配置: 示例 telegraf.conf 如下: ``` [[outputs.http]] url = "http://:6041/influxdb/v1/write?db=" method = "POST" timeout = "5s" username = "" password = "" data_format = "influx" influx_max_line_bytes = 250 ``` ## 验证方法 重启 Telegraf 后可通过查询 TDengine 中配置指定的数据库来验证 Telegraf 写入的数据。