3.配置Grafana Dashboard

本次我们通过部署 Grafana 来进行图形展示,Grafana 为我们提供了非常多的图形模板。

Grafana 官网:https://grafana.com/

1、下载安装 Grafana

我们使用最简单的 RPM 包方式来安装,下载链接:https://grafana.com/grafana/download

wget https://dl.grafana.com/oss/release/grafana-7.0.3-1.x86_64.rpm
yum install grafana-7.0.3-1.x86_64.rpm

运行 Grafana 服务,默认监听在 TCP/3000 的端口上,默认用户名和密码为 “admin”。

访问地址:http://192.168.75.11:3000 , 首次登陆后可以重新设置密码,也可以跳过设置,使用默认的密码

systemctl start grafana-server
systemctl enable grafana-server

2、配置 Grafana 添加数据源



填写对应的配置信息。

  • Name:定义数据源的名字;
  • Type:数据源类型;
  • URL:Prometheus 服务的IP地址和端口;

其他保持默认,然后点击测试并保存。

3,导入 Dashboard 模板

在 Grafana 官方提供了众多的 Dashboard 模板根据自己的需要下载一个模板导入即可。

我这里下载了一个 node_exporter 的图形模板:https://grafana.com/dashboards/1860



导入模板之后,仅修改 Name 和 localhost 选择为我们添加的数据源 Prometheus 即可,导入完成后就可以看到图形啦:

posted @ 2020-06-11 16:03  哈喽哈喽111111  阅读(5342)  评论(0编辑  收藏  举报