'Deploy monitoring system using collectd + TDengine + Grafana

Trying to construct a monitoring system. After using collectd to generate monitoring metrics into files with the following format, my next step will be importing data into TDengine and using Grafana as front end dash board to show collected metrics. What will be the best practice for converting such data format into TDengine compatible data format and import data into the database?

[root@nas01]# head cpu-load-2021-10-15
epoch,min,max,avg
1470731947.726,0.000000,0.002500,0.012500
1470731957.724,0.000000,0.002500,0.012500
1470731967.724,0.000000,0.002500,0.012500
1470731977.724,0.000000,0.002500,0.012500
1470731987.724,0.000000,0.002500,0.012500


Solution 1:[1]

You can use collectd to write data into TDengine via taosAdapter.

Use "direct collection" way:

Modify the collectd configuration /etc/collectd/collectd.conf. taosAdapter uses 6045 for collectd direct collection data write by default.

LoadPlugin network
<Plugin network>
         Server "127.0.0.1" "6045"
</Plugin>

Or use "tsdb writer" way:

Modify the collectd configuration /etc/collectd/collectd.conf. taosAdapter uses 6047 for collectd tsdb write by default.

LoadPlugin write_tsdb
<Plugin write_tsdb>
        <Node>
                Host "localhost"
                Port "6047"
                HostTags "status=production"
                StoreRates false
                AlwaysAppendDS false
        </Node>
</Plugin>

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