Installing the Dashboard Data Collector

Installing the Dashboard Data Collector

After accessing the Prometheus user interface, you can install the Dashboard Data Collector. You must install the Dashboard Data Collector to enable the Dashboard in Studio.

Note

Before installing the Dashboard Data collector, verify that Prometheus has been installed and configured for the cluster.

How to install Prometheus from tarball - Comment - this needs to be its own page.

To install the Dashboard Data Collector:

  1. Store the Data Collector Package obtained from SQream Artifactory.

  1. Extract and rename the package:

    $ tar -xvf dashboard-data-collector-0.5.2.tar.gz
    $ mv package dashboard-data-collector
    
  2. Change your directory to the location of the package folder:

    $ cd dashboard-data-collector
    
  3. Set up the data collection by modifying the SQream and Data Collector IPs, ports, user name, and password according to the cluster:

    $ npm run setup -- \
    $         --host=127.0.0.1 \
    $         --port=3108 \
    $         --database=master \
    $         --is-cluster=true \
    $         --service=sqream \
    $         --dashboard-user=sqream \
    $         --dashboard-password=sqream \
    $         --prometheus-url=http://127.0.0.1:9090/api/v1/query
    
  4. Debug the Data Collector: (Comment - using the npm project manager).

    $ npm start
    

    A json file is generated in the log, as shown below:

    $ {
    $   "machines": [
    $     {
    $       "machineId": "dd4af489615",
    $       "name": "Server 0",
    $       "location": "192.168.4.94",
    $       "totalMemory": 31.19140625,
    $       "gpus": [
    $         {
    $           "gpuId": "GPU-b17575ec-eeba-3e0e-99cd-963967e5ee3f",
    $           "machineId": "dd4af489615",
    $           "name": "GPU 0",
    $           "totalMemory": 3.9453125
    $         }
    $       ],
    $       "workers": [
    $         {
    $           "workerId": "sqream_01",
    $           "gpuId": "",
    $           "name": "sqream_01"
    $         }
    $       ],
    $       "storageWrite": 0,
    $       "storageRead": 0,
    $       "freeStorage": 0
    $     },
    $     {
    $       "machineId": "704ec607174",
    $       "name": "Server 1",
    $       "location": "192.168.4.95",
    $       "totalMemory": 31.19140625,
    $       "gpus": [
    $         {
    $           "gpuId": "GPU-8777c14f-7611-517a-e9c7-f42eeb21700b",
    $           "machineId": "704ec607174",
    $           "name": "GPU 0",
    $           "totalMemory": 3.9453125
    $         }
    $       ],
    $       "workers": [
    $         {
    $           "workerId": "sqream_02",
    $           "gpuId": "",
    $           "name": "sqream_02"
    $         }
    $       ],
    $       "storageWrite": 0,
    $       "storageRead": 0,
    $       "freeStorage": 0
    $     }
    $   ],
    $   "clusterStatus": true,
    $   "storageStatus": {
    $     "dataStorage": 49.9755859375,
    $     "totalDiskUsage": 52.49829018075231,
    $     "storageDetails": {
    $       "data": 0,
    $       "freeData": 23.7392578125,
    $       "tempData": 0,
    $       "deletedData": 0,
    $       "other": 26.236328125
    $     },
    $     "avgThroughput": {
    $       "read": 0,
    $       "write": 0
    $     },
    $     "location": "/"
    $   },
    $   "queues": [
    $     {
    $       "queueId": "sqream",
    $       "name": "sqream",
    $       "workerIds": [
    $         "sqream_01",
    $         "sqream_02"
    $       ]
    $     }
    $   ],
    $   "queries": [],
    $   "collected": true,
    $   "lastCollect": "2021-11-17T12:46:31.601Z"
    $ }
    

Note

Verify that all machines and workers are correctly registered.

  1. Press CTRL + C to stop npm start (Comment - It may be better to refer to it as the npm project manager).

  1. Start the Data Collector with the pm2 service:

    $ pm2 start ./index.js --name=dashboard-data-collector
    
  2. Add the following parameter to the SQream Studio setup defined in Step 4 in Installing Studio below.

    --data-collector-url=http://127.0.0.1:8100/api/dashboard/data
    

Back to Installing Studio on a Stand-Alone Server