千家信息网

使用Grafana监控Doris的方法

发表于:2026-11-01 作者:千家信息网编辑
千家信息网最后更新 2026年11月01日,本篇内容主要讲解"使用Grafana监控Doris的方法",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"使用Grafana监控Doris的方法"吧!Prom
千家信息网最后更新 2026年11月01日使用Grafana监控Doris的方法

本篇内容主要讲解"使用Grafana监控Doris的方法",感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习"使用Grafana监控Doris的方法"吧!

Prometheus服务端安装

Prometheus 是一个开放性的监控解决方案,用户可以非常方便的安装和使用 Prometheus 并且能够非常方便的对其进行扩展。为了能够更加直观的了解 Prometheus Server,接下来我们将在本地部署并运行一个 Prometheus Server实例,通过 Node Exporter 采集当前主机的系统资源使用情况。 并通过 Grafana 创建一个简单的可视化仪表盘。

Prometheus 基于 Golang 编写,编译后的软件包,不依赖于任何的第三方依赖。用户只需要下载对应平台的二进制包,解压并且添加基本的配置即可正常启动 Prometheus Server。具体安装过程可以参考如下内容。

安装配置 Prometheus Server

本次我们选择在 CentOS7 上安装 prometheus ,其他系统安装过程类似,这里不再一一赘述

为了安全,我们这里不用 root 用户启动相关服务,而是用我们自建的 prometheus 用户启动服务,首先需要创建一个用户:

 ➜ groupadd prometheus ➜ useradd -g prometheus -M -s /sbin/nologin prometheus

我们需要从 prometheus下载页 下载我们需要安装的版本,这里我们选择则安装的 prometheus 版本是 v2.7.1 的最新版本。

 ➜ wget https://github.com/prometheus/prometheus/releases/download/v2.7.1/prometheus-2.7.1.linux-amd64.tar.gz

解压并安装 prometheus 服务:

 ➜ tar xf prometheus-2.22.2.linux-amd64.tar -C /srv/ ➜ cd /soft/ ➜ mv prometheus-2.22.2.linux-amd64/ prometheus ➜ mkdir -pv /soft/prometheus/data ➜ chown -R prometheus.prometheus /soft/prometheus

创建 prometheus 系统服务启动文件 /usr/lib/systemd/system/prometheus.service:

 [Unit] Description=Prometheus Server Documentation=https://prometheus.io/docs/introduction/overview/ After=network-online.target  [Service] User=prometheus Restart=on-failure ExecStart=/soft/prometheus/prometheus \   --config.file=/soft/prometheus/prometheus.yml \   --storage.tsdb.path=/srv/prometheus/data ExecReload=/bin/kill -HUP $MAINPID [Install] WantedBy=multi-user.target

修改 prometheus 配置文件 /srv/prometheus/prometheus.yml:

 ➜ grep -v '^#' /srv/prometheus/prometheus.yml global:   scrape_interval:     15s    evaluation_interval: 15s   alerting:   alertmanagers:   - static_configs:     - targets: ["localhost:9093"]  rule_files:   #- "alert.rules"    scrape_configs:   # The job name is added as a label `job=` to any timeseries scraped from this config.   - job_name: 'DORIS_CLUSTER' # 每一个 Doris 集群,我们称为一个 job。这里可以给 job 取一个名字,作为 Doris 集群在监控系统中的名字。     metrics_path: '/metrics' # 这里指定获取监控项的 restful api。配合下面的 targets 中的 host:port,Prometheus 最终会通过 host:port/metrics_path 来采集监控项。     static_configs: # 这里开始分别配置 FE 和 BE 的目标地址。所有的 FE 和 BE 都分别写入各自的 group 中。       - targets: ['doris01:8030']         labels:           group: fe # 这里配置了 fe 的 group,该 group 中包含了 3 个 Frontends        - targets: ['doris02:8040', 'doris03:8040', 'doris04:8040', 'doris05:8040', 'doris06:8040', 'doris07:8040']         labels:           group: be # 这里配置了 be 的 group,该 group 中包含了 3 个 Backends   - job_name: 'prometheus'      # metrics_path defaults to '/metrics'     # scheme defaults to 'http'.      static_configs:     - targets: ['localhost:9090']

启动服务:

 ➜ systemctl daemon-reload ➜ systemctl start prometheus.service ➜ systemctl enable prometheus.service ➜ systemctl status prometheus.service

Prometheus 服务支持热加载配置:

 ➜ systemctl reload prometheus.service

Prometheus 服务启动完成后,可以通过http://localhost:9090访问 Prometheus 的 UI 界面。

安装 Grafana 展示工具

Grafana 我们主要用它来展示 Prometheus 的监控指标的,这样可以直观查看各节点或者服务的状态,本次安装 grafana 我们直接用 yum 安装即可,具体操作也可以参考官方文档

写在rpm安装包

 wget https://dl.grafana.com/oss/release/grafana-7.3.3-1.x86_64.rpm

启动grafana

设置grafana服务开机自启,并启动服务

 #  systemctl daemon-reload #  systemctl enable grafana-server.service #  systemctl start grafana-server.service

访问grafana

浏览器访问http://192.168.56.200:3000(IP:3000端口),即可打开grafana页面,默认用户名密码都是admin,初次登录会要求修改默认的登录密码

然后定义数据源,定义Dashboard或者导入Dashboard json文件

到此,相信大家对"使用Grafana监控Doris的方法"有了更深的了解,不妨来实际操作一番吧!这里是网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

服务 监控 配置 用户 方法 系统 内容 文件 版本 直观 名字 密码 过程 集群 中包 参考 学习 登录 选择 更深 数据库的安全要保护哪些东西 数据库安全各自的含义是什么 生产安全数据库录入 数据库的安全性及管理 数据库安全策略包含哪些 海淀数据库安全审计系统 建立农村房屋安全信息数据库 易用的数据库客户端支持安全管理 连接数据库失败ssl安全错误 数据库的锁怎样保障安全 互联网络科技 苏州找大状互联网科技有限公司 科技互联网企业 互联网和科技创新 华宇互联网科技 万易互联网科技有限公司 齐家互联网科技 远信互联网科技 亿账通互联网科技 碳银互联网科技有限公司 顺网科技2021年互联网排名 深圳前海聚择互联网科技有限公司 华服互联网科技官网 深圳育鹏互联网科技有限公司招聘 美国互联网科技实力 互联网企业科技类企业如何做账 广州梦谷互联网科技有限公司领导 兰石爱特工业互联网科技分公司 瑞安市蟠桃会互联网科技有限公司 知域互联网科技有限公司官网 广东万易互联网科技有限公司惠州分公司 美国互联网科技巨头监管 金融科技创新监管互联网金融 科技制造互联网公司 重庆科技学院互联网 成都玖崟互联网科技有限公司乐商圈怎么样 和信科技工业互联网 亳州好赞互联网科技有限公司 国大互联网教育科技有限公司薪资 江苏互联网科技小贷
0