Telegraf+InfluxDB+Grafana构建监控平台
influxdb
是一款开源的时序数据库 ,使用 go 编写。
telegraf
是一款系统和服务的统计数据插件,可以讲数据插入到 InfluxDB,也是使用 go 编写,和 influxdb 同属一家公司。
grafana
构建监控平台是一个开源指标分析和可视化套件,常用于可视化基础设施的性能数据和应用程序分析的时间序列数据。安装 Telegraf 和 InfluxDB
shell script cat <<EOF | sudo tee /etc/yum.repos.d/influxdata.repo [influxdb] name = InfluxDB Repository - RHEL \$releasever baseurl = https://repos.influxdata.com/rhel/\$releasever/\$basearch/stable enabled = 1 gpgcheck = 1 gpgkey = https://repos.influxdata.com/influxdb.key EOF
sudo yum install influxdb
sudo yum install telegraf
对于CentOS 7以上的版本:支持systemctl start|status|stop|restart [influxdb|telegraf]
telegraf 启动后会自动关联 influxdb,并建立 一个 telegraf 的数据库。