85 lines
2.8 KiB
Plaintext
85 lines
2.8 KiB
Plaintext
### Configuring taosAdapter
|
|
|
|
Method to configure taosAdapter to receive collectd data:
|
|
|
|
- Enable the configuration item in the taosAdapter configuration file (default location is /etc/taos/taosadapter.toml)
|
|
|
|
```
|
|
...
|
|
[opentsdb_telnet]
|
|
enable = true
|
|
maxTCPConnections = 250
|
|
tcpKeepAlive = false
|
|
dbs = ["opentsdb_telnet", "collectd", "icinga2", "tcollector"]
|
|
ports = [6046, 6047, 6048, 6049]
|
|
user = "root"
|
|
password = "taosdata"
|
|
...
|
|
```
|
|
|
|
The default database name written by taosAdapter is `collectd`, but you can also modify the dbs item in the taosAdapter configuration file to specify a different name. Fill in user and password with the actual TDengine configuration values. After modifying the configuration file, taosAdapter needs to be restarted.
|
|
|
|
- You can also use taosAdapter command line parameters or set environment variables to start, to enable taosAdapter to receive collectd data, for more details please refer to the taosAdapter reference manual.
|
|
|
|
### Configuring collectd
|
|
|
|
collectd uses a plugin mechanism that can write the collected monitoring data to different data storage software in various forms. TDengine supports direct collection plugins and write_tsdb plugins.
|
|
|
|
#### Configuring to receive direct collection plugin data
|
|
|
|
Modify the related configuration items in the collectd configuration file (default location /etc/collectd/collectd.conf).
|
|
|
|
```text
|
|
LoadPlugin network
|
|
<Plugin network>
|
|
Server "<taosAdapter's host>" "<port for collectd direct>"
|
|
</Plugin>
|
|
```
|
|
|
|
Where \<taosAdapter's host> should be filled with the domain name or IP address of the server running taosAdapter. \<port for collectd direct> should be filled with the port used by taosAdapter to receive collectd data (default is 6045).
|
|
|
|
Example as follows:
|
|
|
|
```text
|
|
LoadPlugin network
|
|
<Plugin network>
|
|
Server "127.0.0.1" "6045"
|
|
</Plugin>
|
|
```
|
|
|
|
#### Configuring write_tsdb plugin data
|
|
|
|
Modify the related configuration items in the collectd configuration file (default location /etc/collectd/collectd.conf).
|
|
|
|
```text
|
|
LoadPlugin write_tsdb
|
|
<Plugin write_tsdb>
|
|
<Node>
|
|
Host "<taosAdapter's host>"
|
|
Port "<port for collectd write_tsdb plugin>"
|
|
...
|
|
</Node>
|
|
</Plugin>
|
|
```
|
|
|
|
Where \<taosAdapter's host> should be filled with the domain name or IP address of the server running taosAdapter. \<port for collectd write_tsdb plugin> should be filled with the port used by taosAdapter to receive collectd write_tsdb plugin data (default is 6047).
|
|
|
|
```text
|
|
LoadPlugin write_tsdb
|
|
<Plugin write_tsdb>
|
|
<Node>
|
|
Host "127.0.0.1"
|
|
Port "6047"
|
|
HostTags "status=production"
|
|
StoreRates false
|
|
AlwaysAppendDS false
|
|
</Node>
|
|
</Plugin>
|
|
```
|
|
|
|
Then restart collectd:
|
|
|
|
```
|
|
systemctl restart collectd
|
|
```
|