部署Dashboard

    Dashboard版本和Nebula Graph的版本对应关系如下。

    端口说明

    部署Dashboard需要占用如下端口:

    • 9200

    • 9100

    • 9090

    • 8090

    • 7003

    根据需要下载 tar 包,建议选择最新版本。

    目录结构说明

    5个目录需要按照部署需要,复制到各个机器上,详情请参见下文。

    在目录node-exporter内执行如下命令启动服务:

    服务启动后,可以在浏览器中输入<IP>:9100检查服务是否正常启动。

    1. 在目录nebula-stats-exporter内修改文件config.yaml,配置所有服务的HTTP端口,示例如下:

      1. version: v0.0.4
      2. clusters:
      3. - name: nebula
      4. instances:
      5. - name: metad0
      6. endpointIP: 192.168.8.157
      7. endpointPort: 19559
      8. - name: metad1
      9. endpointIP: 192.168.8.155
      10. endpointPort: 19559
      11. componentType: metad
      12. endpointIP: 192.168.8.154
      13. endpointPort: 19559
      14. componentType: metad
      15. - name: graphd0
      16. endpointIP: 192.168.8.157
      17. endpointPort: 19669
      18. componentType: graphd
      19. - name: graphd1
      20. endpointIP: 192.168.8.155
      21. endpointPort: 19669
      22. componentType: graphd
      23. - name: graphd2
      24. endpointIP: 192.168.8.154
      25. endpointPort: 19669
      26. componentType: graphd
      27. - name: storaged0
      28. endpointIP: 192.168.8.157
      29. endpointPort: 19779
      30. componentType: storaged
      31. endpointIP: 192.168.8.155
      32. endpointPort: 19779
      33. componentType: storaged
      34. - name: storaged2
      35. endpointIP: 192.168.8.154
      36. componentType: storaged
    2. 执行如下命令启动服务:

      1. $ nohup ./nebula-stats-exporter --listen-address=":9200" --bare-metal --bare-metal-config=./config.yaml &

    服务启动后,可以在浏览器中输入<IP>:9200检查服务是否正常启动。

    1. 在目录prometheus内修改文件prometheus.yaml,配置node-exporter服务和nebula-stats-exporter服务的IP地址和端口,示例如下:

      • scrape_interval:收集监控数据的间隔时间。默认为1分钟。

    2. 执行如下命令启动服务:

      1. $ nohup ./prometheus --config.file=./prometheus.yaml &

    服务启动后,可以在浏览器中输入<IP>:9090检查服务是否正常启动。

    在目录nebula-http-gateway内执行如下命令启动服务:

    1. $ nohup ./nebula-httpd &

    服务启动后,可以在浏览器中输入<IP>:8090检查服务是否正常启动。

    1. 在目录nebula-graph-dashboard/static/内修改文件custom.json,配置Graph服务的IP地址和端口,示例如下:

    2. 在目录nebula-graph-dashboard内执行如下命令启动服务:

      1. $ npm run start

    服务启动后,可以在浏览器中输入<IP>:7003检查服务是否正常启动。

    停止Dashboard

    如果需要停止Dashboard,可以使用kill <pid>的方式停止,示例如下:

    1. $ kill $(lsof -t -i :9100) # 停止node-exporter服务
    2. $ kill $(lsof -t -i :9200) # 停止nebula-stats-exporter服务
    3. $ kill $(lsof -t -i :9090) # 停止prometheus服务
    4. $ kill $(lsof -t -i :8090) # 停止nebula-http-gateway服务
    5. $ npm run stop # 停止nebula-graph-dashboard服务