docs/en/10-third-party/01-collection/03-telegraf.md
import Telegraf from "../../assets/resources/_telegraf.mdx"
Telegraf is a very popular open-source metric collection software. In data collection and platform monitoring systems, Telegraf can collect operational information from various components without the need to manually write scripts for periodic collection, reducing the difficulty of data acquisition.
Simply add the output configuration of Telegraf to point to the corresponding URL of taosAdapter and modify several configuration items to write Telegraf's data into TDengine. Storing Telegraf's data in TDengine can fully utilize TDengine's efficient storage and query performance and cluster processing capabilities for time-series data.
The following preparations are needed to write Telegraf data into TDengine:
Restart the Telegraf service:
sudo systemctl restart telegraf
Use TDengine CLI to verify that data is being written from Telegraf to TDengine and can be correctly read:
taos> show databases;
name |
=================================
information_schema |
performance_schema |
telegraf |
Query OK, 3 rows in database (0.010568s)
taos> use telegraf;
Database changed.
taos> show stables;
name |
=================================
swap |
cpu |
system |
diskio |
kernel |
mem |
processes |
disk |
Query OK, 8 row(s) in set (0.000521s)
taos> select * from telegraf.system limit 10;
ts | load1 | load5 | load15 | n_cpus | n_users | uptime | uptime_format | host
|
=============================================================================================================================================================================================================================================
2022-04-20 08:47:50.000000000 | 0.000000000 | 0.050000000 | 0.070000000 | 4 | 1 | 5533 | 1:32 | shuduo-1804
|
2022-04-20 08:48:00.000000000 | 0.000000000 | 0.050000000 | 0.070000000 | 4 | 1 | 5543 | 1:32 | shuduo-1804
|
2022-04-20 08:48:10.000000000 | 0.000000000 | 0.040000000 | 0.070000000 | 4 | 1 | 5553 | 1:32 | shuduo-1804
|
Query OK, 3 row(s) in set (0.013269s)
:::note
:::