一文带你使用 Apache IoTDB 系统监控模块

在 Apache IoTDB 0.13.0 版本开始,我们引入了系统监控模块,本文主要介绍了如何在单机版开启系统监控模块,并且使用 Prometheus + Grafana 完成系统监控的可视化。
1.相关配置信息
1.Apache IoTDB:0.13.0,可以前往官网下载:https://iotdb.apache.org/Download/
2.Prometheus:2.30.3,可以前往官网下载:https://prometheus.io/download/
3.Grafana:8.4.2,可以前往官网下载:https://grafana.com/grafana/download
2.修改配置文件,启动 IoTDB
1.首先,进入到 apache-iotdb-0.13.0-all-bin
2.找到监控相关配置文件 conf/iotdb-metric.yml,修改如下配置,其他配置保持不变:
3.运行脚本启动 IoTDB:./sbin/start-server.sh,出现如下提示则为启动成功

4.在浏览器进入 http://localhost:9091/metrics 网址,可以查看到如下的监控项信息:

3.配置 Prometheus 进行数据采集
下载 Prometheus 的二进制包到本地,解压后进入对应文件夹:
2.修改 Prometheus 的配置文件prometheus.yml
如下:新增iotdb
任务收集 IoTDB 的监控数据:
3.启动 Promethues
4.在浏览器中输入 http://localhost:9090,进入 Prometheus
5.查看配置是否成功:我们点击进入 Status 下的 Target 界面

6.当我们看到如下图 State 为 Up 时表示配置成功并已经联通,点击左侧链接可以跳转到网页监控。

4.使用 Grafana 进行数据可视化
Grafana 启动与配置
1.下载 Grafana 到本地
2.启动 Grafana 并进入:
3.在浏览器中输入 http://localhost:3000,进入 Prometheus
4.首先我们在 Configuration 中配置 Data Source 为 Prometheus

5.在配置 Data Source 时注意 Prometheus 所在的 URL,配置好后点击 Save & Test 出现 Data source is working 提示则为配置成功

在 Grafana 中创建 Dashboard 进行数据可视化
1.首先创建 Dashboard,然后创建 Panel

2. 之后就可以在面板根据自己的需求对监控相关的数据进行可视化(所有相关的监控指标可以先在 job 中选择 iotdb 筛选)

3.选择关注的监控指标可视化完成后,我们就得到了这样的面板:

后续我们还会继续分享 Apache IoTDB 监控模块,敬请期待!
参考
https://iotdb.apache.org/UserGuide/Master/Maintenance-Tools/Metric-Tool.html
关于我们
作为全球性开源项目,截至目前 Apache IoTDB 已拥有 170 名贡献者、1.9KStar、575 Forks。我们为大家提供了参与指南,欢迎越来越多的小伙伴助力 Apache IoTDB 项目的不断发展与前进。

欢迎迈出加入 Apache IoTDB 社区的第一步!
QQ 群:659990460
微信群:添加好友 qinchuqing/tietouqiao
github 仓库:https://github.com/apache/iotdb
版权声明: 本文为 InfoQ 作者【Apache IoTDB】的原创文章。
原文链接:【http://xie.infoq.cn/article/b29b7b18b6883fbd344e2dd5e】。
本文遵守【CC-BY 4.0】协议,转载请保留原文出处及本版权声明。
评论