什么是Nebula Dashboard,安装详细步骤教程
Nebula Dashboard 是一款用于监控 Nebula Graph 集群中机器和服务状态的可视化工具。
- 监控集群中所有机器的状态,包括 CPU、内存、负载、磁盘和流量。
- 监控集群中所有服务的信息,包括服务 IP 地址、版本和监控指标(例如查询数量、查询延迟、心跳延迟等)。
- 监控集群本身的信息,包括集群的服务信息、分区信息、配置和长时任务。
Nebula Dashboard 由以下 5 种服务组成,通过 [这个地址] (https://oss-cdn.nebula–graph.com.cn/nebula-graph-dashboard/1.0.1/nebula-graph-dashboard-1.0.1.x86_64.tar.gz) 下载压缩包并解压后可以在目录 nebula-graph-dashboard看到 5 个子目录,分别对应 5 个服务的目录。除了 node-exporter 服务需要在 3 台服务器上都部署,其余服务只需要在 ydt-net-nebula1 上部署。
目录
部署 node-exporter 服务
在目录 node-exporter内执行如下命令启动服务:
nohup ./node-exporter --web.listen-address=":9100" &
部署 nebula-stats-exporter 服务
在目录 nebula-stats-exporter内修改文件 config.yaml,配置所有服务的 HTTP 端口。
version: v0.0.2 nebulaItems: - instanceName: metad0 endpointIP: 11.8.38.149 endpointPort: 9559 componentType: metad - instanceName: metad1 endpointIP: 11.8.38.150 endpointPort: 9559 componentType: metad - instanceName: metad2 endpointIP: 11.8.38.151 endpointPort: 9559 componentType: metad - instanceName: graphd0 endpointIP: 11.8.38.149 endpointPort: 9669 componentType: graphd - instanceName: graphd1 endpointIP: 11.8.38.150 endpointPort: 9669 componentType: graphd - instanceName: graphd2 endpointIP: 11.8.38.151 endpointPort: 9669 componentType: graphd - instanceName: storaged0 endpointIP: 11.8.38.149 endpointPort: 9779 componentType: storaged - instanceName: storaged1 endpointIP: 11.8.38.150 endpointPort: 9779 componentType: storaged - instanceName: storaged2 endpointIP: 11.8.38.151 endpointPort: 9779 componentType: storaged
执行如下命令启动服务:
nohup ./nebula-stats-exporter --listen-address=":9200" --bare-metal --bare-metal-config=./config.yaml &
部署 prometheus 服务
在目录 prometheus内修改文件 prometheus.yaml,配置 node-exporter服务和 nebula-stats-exporter服务的 IP 地址和端口。
global: scrape_interval: 5s # 收集监控数据的间隔时间。默认为1分钟。 evaluation_interval: 5s # 告警规则扫描时间间隔。默认为1分钟。 scrape_configs: - job_name: 'node-exporter' static_configs: - targets: [ '11.8.38.149:9100', # node-exporter 服务的 IP 地址和端口。 '11.8.38.150:9100', '11.8.38.151:9100' ] - job_name: 'nebula-stats-exporter' static_configs: - targets: [ '11.8.38.149:9200', # nebula-stats-exporter 服务的 IP 地址和端口。 ]
执行如下命令启动服务:
nohup ./prometheus --config.file=./prometheus.yaml &
部署 nebula-http-gateway 服务
在目录 nebula-http-gateway内执行如下命令启动服务:
nohup ./nebula-httpd &
部署 nebula-graph-dashboard 服务
在目录 nebula-graph-dashboard/static/内修改文件custom.json,配置 Graph 服务的 IP 地址和端口。
{ "connection": { "ip": "11.8.38.149", "port": 9669 }, "alias": { "ip:port": "instance1" }, "chartBaseLine": { } }
在目录 nebula-graph-dashboard内执行如下命令启动服务:
npm run start
访问 Nebula Dashboard 界面
在浏览器输入 http://11.8.38.149:7003 访问 Graph Dashboard 界面。用户名: root,密码: nebula。在 Nebula Dashboard 界面上我们可以看到 CPU,内存,磁盘使用率和上下行流量等信息。
Graph Dashboard 界面