1、安装
wget http://get.influxdb.org/telegraf/telegraf-0.11.1-1.x86_64.rpm
yum localinstall telegraf-0.11.1-1.x86_64.rpm
2、启动命令
systemctl start telegraf
3、配置文件
vim /etc/telegraf/telegraf.conf
-----------
[[outputs.influxdb]]
urls = ["http://localhost:8086"] #数据库地址
database = "telegraf" #数据库名称
retention_policy = "" #注意为空
precision = "s"
timeout = "5s"
username = "telegraf" #用户
password = "password" #密码
-----------