

cd etc command to navigate to the /etc directory, and then run the following command to generate the Telegraf configuration file.cd etctelegraf config > telegraf.conf
vi telegraf.conf to open the file. Find [[outputs.influxdb]] and configure the address for the CTSDB to which data will be output. As shown below, set urls as the internal network address and port of the CTSDB 3.0, database is the name of the database, and username and password are configured as the username and password for accessing the database.[[outputs.influxdb]]urls = ["http://10.1.98.53:8086"]database = "replicaset"skip_database_creation = trueexclude_database_tag = trueexclude_retention_policy_tag = truecontent_encoding = "identity"timeout = "5s"username = "ctsdbi-s0u*****"password = "*********"
# Read metrics about cpu usage[[inputs.cpu]]## Whether to report per-cpu stats or notpercpu = true## Whether to report total system cpu stats or nottotalcpu = true## If true, collect raw CPU time metricscollect_cpu_time = false## If true, compute and report the sum of all non-idle CPU statesreport_active = false## If true and the info is available then add core_id and physical_id tagscore_tags = false
telegraf -config /etc/telegraf.conf

measurements to confirm that the data has been written successfully.
Feedback