1、文件准备数据库
1.1 文件名称windows
telegraf-1.2.1_windows_amd64.zipspa
influxdb-1.2.2_windows_amd64.zip日志
grafana-4.2.0.windows-x64.zipcode
1.2 下载地址orm
https://portal.influxdata.com/downloadsserver
【注意、注意、注意】下载时可能须要FanQiangblog
https://grafana.com/grafana/download?platform=windows队列
2、安装flux
分别解压下载下来的文件到指定目录,好比:d:\Program Files
3、配置
3.1 Telegraf
修改influxdb.conf,设置日志文件目录:
## Specify the log file name. The empty string means to log to stdout. logfile = "D:/Program Files/Telegraf/telegraf.log"
3.2 InfluxDb
修改influxdb.conf,打开Web控制台:
[admin]
# Determines whether the admin service is enabled.
enabled = true
# The default bind address used by the admin service.
bind-address = ":8083"
3.3 Grafana
使用默认配置
4、启动
4.1 Influxdb
经过cmd命令窗口,切换到influxdb安装目录,执行以下命令:
influxd -config influxdb.conf
4.2 Telegraf
经过cmd命令窗口,切换到Telegraf安装目录,执行以下命令:
telegraf -config telegraf.conf
4.3 Grafana
切换到Grafana安装目录中的bin目录下,双击grafana-server.exe启动程序
5、使用
访问http://localhost:3000,使用admin/admin登陆本机Grafana,新建influxdb数据源:
【注意】Telegraf启动后,向InfluxDb中上报数据时,会默认建立一个telegraf数据库,因此上面咱们配置DataBase是telegraf
查看http://localhost:8083,能够发现telegraf库中,默认有4个Measurements(表):
配置Grafana中的面板,这样一个简易的本机监控系统就搭建完了:
【注意】CPU是按核数维度统计的,磁盘队列是按盘符统计的