复古 护眼 海天 深邃 暗黑 默认
Logo
如何启用监控功能

如何启用监控功能 #

监控功能需要通过 Prometheus 的 node_exporter 来实现主机监控,以及通过 SphereEx 企业数据服务平台的 agent 模块来实现计算节点监控。

前提条件

启用监控功能前:

操作步骤

  1. 安装并启动 Prometheus。 假设运行地址为 192.168.1.100,端口 9090。
  2. 配置监控目标。 注意: 修改 Prometheus 的配置文件 prometheus.yml,在 scrape_configs 节点下的 static_configs.targets 中添加监控目标的主机、计算节点 IP 及端口。需要使用主机及计算节点实际的 IP 地址,不建议使用 127.0.0.1、localhost 等本地地址。

假设监控主机的 node_exporter 访问地址为 192.168.1.100:9100,计算节点的 agent 模块中 Prometheus 插件运行地址为 192.168.1.100:9000。

 static_configs:
   - targets: ["192.168.1.100:9100", "192.168.1.100:9000"]

3.配置 application.properties 中 Prometheus 的地址。 prometheus.server.address=http://192.168.1.100:9090