技术栈
Telegraf + InfluxDB + Grafana
- Telegraf:1.6.0
- InfluxDB:1.5.2
- Grafana:5.0.4
- 环境:Centos 7
安装
- Telegraf
$ wget https://dl.influxdata.com/telegraf/releases/telegraf-1.6.0-1.x86_64.rpm $ yum localinstall telegraf-1.6.0-1.x86_64.rpm -y $ systemctl start telegraf $ systemctl enable telegraf
- InfluxDB
$ wget https://dl.influxdata.com/influxdb/releases/influxdb-1.5.2.x86_64.rpm $ yum localinstall influxdb-1.5.2.x86_64.rpm -y $ service influxdb start $ systemctl enable influxdb
- Grafana
$ wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-5.0.4-1.x86_64.rpm $ yum localinstall grafana-5.0.4-1.x86_64.rpm -y $ systemctl start grafana-server $ systemctl enable grafana-server
配置
- 配置telegraf
找到outputs.influxdb,去掉urls的注释以及databases的注释
重启telegraf服务:systemctl restart telegraf
- 配置grafana
访问grafana:http://IP:3000,账号默认均为admin
设置数据源,Name随便写,Type选择Telegraf,URL填写http://localhost:8086,database填写telegraf,点击Save & Test,显示Successful则为数据源配置成功
设置展示页面Dashboard
使用官网提供的一个模板:https://grafana.com/dashboards/928,复制这个dashboard的ID
- 导入dashboard,点击import dashboard。在第一个输入框中输入刚才复制的ID,点击load,随后选择好对应的数据库,设置好dashboard的name,点击import
最终效果
附件 & 说明
三个软件的安装包(仅rpm包)
下载地址:https://pan.iicats.com/wl/?id=isbOkYvbTiTCLx89I1bo9QAPKJ5MiWIz&mode=regula
这个也支持windows的监控,就不多做介绍了,附上windows的安装包链接
telegraf-1.5.0_windows_amd64.zip influxdb-1.4.2_windows_amd64.zip grafana-4.6.3.windows-x64.zip telegraf-1.5.0_windows_amd64.zip wget https://dl.influxdata.com/telegraf/releases/telegraf-1.5.0_windows_amd64.zip unzip telegraf-1.5.0_windows_amd64.zip influxdb-1.4.2_windows_amd64.zip wget https://dl.influxdata.com/influxdb/releases/influxdb-1.4.2_windows_amd64.zip unzip influxdb-1.4.2_windows_amd64.zip grafana-4.6.3.windows-x64.zip wget https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.6.3.windows-x64.zip unzip grafana-4.6.3.windows-x64.zip
本文作者为olei,转载请注明。
很不错的工具
这个是专业人士用的,我们一般用不到
不错!