产品动态
公告


cd etc 命令,进入 etc 目录下,执行如下命令,生成 Telegraf 配置文件。cd etctelegraf config > telegraf.conf
vi telegraf.conf 打开文件,找到 [[outputs.influxdb]] ,配置数据输出的时序数据库地址。如下所示, urls 配置为时序数据库 CTSDB 3.0 版的内网地址与端口;database 为数据库库名;username 与 password 配置访问数据库用户名与密码 。[[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 ,确认数据已正常写入。
文档反馈