Telegraf is a viral, open-source, metrics collection software. Telegraf can collect the operation information of various components without having to write any scripts to collect regularly, reducing the difficulty of data acquisition.
Telegraf is a open-source, metrics collection software. Telegraf can collect the operation information of various components without having to write any scripts to collect regularly, reducing the difficulty of data acquisition.
Telegraf's data can be written to TDengine by simply adding the output configuration of Telegraf to the URL corresponding to taosAdapter and modifying several configuration items. The presence of Telegraf data in TDengine can take advantage of TDengine's efficient storage query performance and clustering capabilities for time-series data.
Telegraf's data can be written to TDengine by simply adding the output configuration of Telegraf to the URL corresponding to taosAdapter and modifying several configuration items. The presence of Telegraf data in TDengine can take advantage of TDengine's efficient storage query performance and clustering capabilities for time-series data.
## Install Telegraf
## Install Telegraf
Please refer to the [official documentation](https://docs.influxdata.com/telegraf/v1.22/install/) for Telegraf installation.
The resulting configuration will collect CPU and memory data and sends it to TDengine database named "telegraf". Database "telegraf" will be created automatically if it dose not exist in advance.
<!-- exclude -->
<!-- exclude -->
You are expected to replace `<url>` and `<token>` with real TDengine cloud URL and token. To obtain the real values, please log in [TDengine Cloud](https://cloud.tdengine.com).
You are expected to replace `<url>` and `<token>` with real TDengine cloud URL and token. To obtain the real values, please log in [TDengine Cloud](https://cloud.tdengine.com).
<!-- exclude-end -->
<!-- exclude-end -->
In above configuration example, all data will be written to database `telegraf`, but you can change it to any database you prefer. The database will be created automatically if it dose not exist in advance.
## Verification plugin
## Start Telegraf
Restart Telegraf service:
Start telegraf using new generated telegraf.conf file.
```
```bash
sudo systemctl restart telegraf
telegraf --config telegraf.conf
```
```
Use TDengine CLI to verify Telegraf correctly writing data to TDengine and read out:
## Verification
Log in TDengine Cloud, click "Explorer" on the left navigation bar.
Check weather database "telegraf" exist by executing:
```sql
showdatabases;
```
```
taos> show databases;

name | created_time | ntables | vgroups | replica | quorum | days | keep | cache(MB) | blocks | minrows | maxrows | wallevel | fsync | comp | cachelast | precision | update | status |