This section describes how to edit a custom monitoring dashboard.

Prerequisites

You need to join a cluster or project and have the Monitoring Management permission in the cluster or project. For more information, please refer to Cluster Roles and Project Roles.

Steps

  1. Log in to the KubeSphere web console as a user with the Monitoring Management permission and go to your cluster or workspace.

  2. Click Monitoring & Alerting > Custom Monitoring in the left navigation pane.

  3. In the list, click the name of a custom monitoring dashboard to open it. Then, in the upper-right corner of the page, click Edit Template.

  4. On the left side of the page, configure monitoring metrics displayed as text.

    • Click add-dark to add a monitoring metric.

      Parameter Description

      Chart Name

      The name of the monitoring metric.

      Unit

      The unit of the metric data.

      Precision

      The number of valid decimal places for the metric data.

      Monitoring Metric

      Monitoring metrics exposed by the application. You can click Monitoring Metrics and then select a metric from the dropdown list, or manually enter a PromQL statement. Please ensure that you have configured the application to expose monitoring metrics and have configured a monitoring exporter. For more information about PromQL expressions, please refer to the Prometheus official documentation.

    • Hover your mouse over a monitoring metric, then click trash-dark to delete the monitoring metric.

    • Hover your mouse over a monitoring metric, then click pen-dark to edit the monitoring metric.

  5. In the monitoring chart list on the right side of the page, configure monitoring charts.

    • Click Add Monitoring Item to add a monitoring chart.

      Parameter Description

      Legend Type

      The vertical data display method for the monitoring chart. Available types include Basic Chart and Stacked Chart.

      Chart Color Scheme

      The color scheme style for the monitoring chart. Available types include Default Scheme, Cool Tone, and Warm Tone.

      Basic Information

      User-defined monitoring chart name and description.

      Data

      Monitoring metrics displayed in the chart.

      • Legend Name: User-defined name for the monitoring metric.

      • Interval: The time interval for data in the monitoring chart, in the format <value><unit>, e.g., 1m indicates a data interval of 1 minute.

      • Monitoring Metric: The monitoring metric exposed by the application. You can click Monitoring Metric and select a metric from the dropdown list, or manually enter a PromQL statement. Please ensure you have configured the application to expose monitoring metrics and have configured a monitoring exporter. For more information on PromQL expressions, please refer to Prometheus Official Documentation.

      Y-Axis

      Settings for the vertical axis of the monitoring chart.

      • Unit: The data unit for the vertical axis.

      • Precision: The number of significant decimal places for the data on the vertical axis.

    • Hover your mouse over a monitoring chart name, then click trash-light to delete the monitoring chart.

    • Hover your mouse over a monitoring chart name, then click pen-light to edit the monitoring chart.

    • Drag the drag-handle on the right side of the monitoring chart name to adjust the order of monitoring charts.

  6. In the upper-right corner of the page, click Save Template to complete the editing.