node_exporter是采集器,把采集到的数据存储到prometheus数据库,然后grafana取数据库里面的数据,进行展示;

prometheus部署

下载对应的系统版本

grafana+prometheus+node_exporter在win10环境上的部署

 

解压后,双击prometheus.exe,如下图:

grafana+prometheus+node_exporter在win10环境上的部署

 

点击允许访问,如下图:

grafana+prometheus+node_exporter在win10环境上的部署

 

浏览器输入http://localhost:9090/,如下图:

grafana+prometheus+node_exporter在win10环境上的部署

 

点击Status-Targets,如下图:

grafana+prometheus+node_exporter在win10环境上的部署

 

新打开的http://localhost:9090/targets页面如下:

grafana+prometheus+node_exporter在win10环境上的部署

 

node_exporter部署

下载相应的msi版本:

grafana+prometheus+node_exporter在win10环境上的部署

 

下载好后,一直Next,直到安装完成,打开浏览器,输入http://localhost:9182,

打开如下页面:

grafana+prometheus+node_exporter在win10环境上的部署

 

CTRL+F5,搜索cpu,有下面的内容,说明采集成功

grafana+prometheus+node_exporter在win10环境上的部署

 

 配置prometheus目录下的prometheus.yml文件

//加入如下内容:
 - job_name: 'localhost9182'
 static_configs:
 - targets: ['localhost:9182'] 

grafana+prometheus+node_exporter在win10环境上的部署

 

重启prometheus后,浏览器查看http://localhost:9090/targets页面,可以看到刚才加入的job:

grafana+prometheus+node_exporter在win10环境上的部署

 

grafana的安装与配置

下载相应的msi,下载好后,进行安装:

grafana+prometheus+node_exporter在win10环境上的部署

 

grafana+prometheus+node_exporter在win10环境上的部署

 

一直Next ,安装完即可,然后浏览器输入http://localhost:3000/

grafana+prometheus+node_exporter在win10环境上的部署

 

admin/admin 登录进去以后,配置prometheus数据源

grafana+prometheus+node_exporter在win10环境上的部署

 

grafana+prometheus+node_exporter在win10环境上的部署

 

去官网上找到windows系统相关的面板,复杂id后导入面板

grafana+prometheus+node_exporter在win10环境上的部署

 

grafana+prometheus+node_exporter在win10环境上的部署

 

grafana+prometheus+node_exporter在win10环境上的部署

 

结果展示

grafana+prometheus+node_exporter在win10环境上的部署

相关文章: