Win 10 实战 InfluxDb + Grafana 数据监控

需求

InfluxDb

当然先安装Grafana也是可以的,没有明显的先后关系;
下载网站:https://portal.influxdata.com/downloads,找到Windows版本的下载地址,zip包,解压即可使用,配置文件 influxdb.conf 也基本上不需要修改。使用默认的配置即可。双击influxd.exe启动服务端,然后双击influx.exe 启动一个命令行客户端。基本命令和MongoDB很类似。
create databases my_influxdb
show databases
use my_influxdb
insert

然后我想可视化的方式看到数据,在之前版本的Influxdb,暴露默认的 8083 端口可以查询显示数据。因为主推Chronograf 故而废弃这个web功能。
取而代之可以使用InfluxDBStudio: https://github.com/CymaticLabs/InfluxDBStudio/releases

Grafana

安装方式也是很简单的,下载Windows版本的zip,解压,conf目录下面的配置文件 defaults.ini copy一份命名为 custom.ini,然后双击grafana-server.exe即可。根据 custom.ini 里面配置的端口,打开本地服务,localhost:3000,然后就可以看到user guide,指引我们添加data source,添加panel,

安装插件:
使用git bash,输入命令行:./grafana-cli.exe plugins install grafana-piechart-panel,其中grafana-piechart-panel 为插件名字,可以去插件库搜索得知。

安装好之后,本地可以在data目录下面看到 \data\plugins\grafana-piechart-panel,实际上就是把源码(主要是js 和css)从GitHub(https://github.com/grafana/piechart-panel)下载到本地,然后Grafana就会从这个目录去加载插件。而插件的主要功能就是展示酷炫的效果,这个正好是js,h5的强项。

你可能感兴趣的:(tool)