Updated on 2024-10-29 GMT+08:00

Configuring a Dashboard to View Metric Data

In Grafana, you can customize dashboards for various views. ModelArts also provides configuration templates for clusters. This section describes how to configure a dashboard by using a ModelArts template or creating a dashboard. For more usage, see Grafana tutorials.

Preparations

ModelArts provides templates for cluster view, node view, user view, task view, and task details view. These templates can be downloaded from Grafana official documents. You can import and use them on Dashboards.
Table 1 Template download URLs

Template

Download URL

Cluster view

https://cnnorth4-modelarts-sdk.obs.cn-north-4.myhuaweicloud.com/metrics/grafana/dashboards/ModelArts-Cluster-View.json

Node view

https://cnnorth4-modelarts-sdk.obs.cn-north-4.myhuaweicloud.com/metrics/grafana/dashboards/ModelArts-Node-View.json

User view

https://cnnorth4-modelarts-sdk.obs.cn-north-4.myhuaweicloud.com/metrics/grafana/dashboards/ModelArts-User-View.json

Task view

https://cnnorth4-modelarts-sdk.obs.cn-north-4.myhuaweicloud.com/metrics/grafana/dashboards/ModelArts-Task-View.json

Task details view

https://cnnorth4-modelarts-sdk.obs.cn-north-4.myhuaweicloud.com/metrics/grafana/dashboards/ModelArts-Task-Detail-View.json

Using a ModelArts Template to View Metrics

  1. Open Dashboards and choose New > Import.

  1. Import the dashboard template.

    Copy the template download URL provided in Preparations to a web browser and copy the content of the JSON file. Paste the content to the dashboard template and click Load.

    Figure 1 Copying the content of the JSON file
    Figure 2 Pasting the content of the JSON file to the dashboard template
  2. Change the view name and click Import.
    Figure 3 Changing the view name

    Note: If a message is displayed, indicating that the UID is duplicate, click Change uid, change the UID in the JSON file, and click Import.

    Figure 4 Changing the UID
  3. After the import, view the imported views in Dashboards. Then, click a view to open the monitoring page.

  4. Use the template.

    After the import is successful, you can click the template to view its details. This section introduces some commonly-used functions.

    • Changing the data source and resource pool
      Figure 5 Changing the data source and resource pool

      Click the area marked by the red box. A drop-down list will appear. From there, you can change the data source and the resource pool.

    • Refreshing data

      Click the refresh button in the upper right corner to refresh all data on the dashboard. The data on each panel is also updated.

    • Changing the automatic refresh time

      The default refresh interval of a template is 15 minutes. If you need to update the interval, change the value from the drop-down list box in the upper right corner.

    • Changing the time range for obtaining dashboard data
      Figure 6 Changing the time range for obtaining data

      Click the button in the upper right corner to change time range for obtaining data. This time range affects all panels except those with a fixed time.

    • Adding a panel
      Figure 7 Adding a panel

      Click the + icon in the upper right corner to add a panel.

      After a panel is added, you can obtain the data in the panel. Configure the data source and resource pool as follows to use the current dashboard settings.

      Figure 8 Using the current dashboard settings

Creating a Dashboard to View Metrics

  1. Open Dashboards, click New, and choose New Dashboard.
  2. Click Add a new panel.
  3. On the New dashboard / Edit Panel page, set the following parameters:

    Data source: Configured Grafana data source

    Metric: Metric name. You can obtain the metric to be queried by referring to Table 1, Table 2, and Table 3.

    Labels: Used for filtering the metric. For details, see and Table 4.

    Figure 9 Creating a dashboard to view metrics