< img height="1" width="1" style="display:none;" alt="" src="https://px.ads.linkedin.com/collect/?pid=3131724&fmt=gif" />

Create Custom Monitoring Dashboards

This section introduces how to create a custom monitoring dashboard.

Prerequisites

  • You should join a cluster or a project and have the Monitoring Management permission within the cluster or the project. For more information, refer to "Cluster Roles" and "Project Roles".

  • Configure applications running in containers to expose monitoring metrics that conform to the Prometheus specification at a certain service endpoint. For more information, see the Prometheus Documentation.

  • You should set up a monitoring exporter on the service exposing the workload to declare the path providing application monitoring metrics. KubeSphere will get the application’s monitoring metrics based on the relevant parameters of the monitoring exporter. For more information, see Edit a Metrics Exporter.

Steps

  1. Log in to the KubeSphere web console with a user who has the Monitoring Management permission and enter your cluster or project.

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

  3. Click Create on the page.

  4. In the Create Custom Monitoring Dashboard dialog, set the name, description, and template of the monitoring dashboard, then click Next.

    ParameterDescription

    Name

    The name of the custom monitoring dashboard. The name can only contain lowercase letters, numbers, and hyphens (-), must start and end with a lowercase letter or number, and can be up to 63 characters long.

    Description

    The description of the custom monitoring dashboard. The description can contain any characters and can be up to 256 characters long.

    Template

    The template of the custom monitoring dashboard.

    • KubeSphere provides templates with preset custom monitoring dashboards for Elasticsearch, MySQL, Redis, Jenkins, and GPU. Each template provides some preset monitoring metrics and monitoring charts, which you can customize on top of to reduce operations.

    • To use a Grafana dashboard, you need to upload the Grafana dashboard configuration file.

    • You can also choose Custom to use an empty template.

  5. On the custom monitoring dashboard editing page, set the monitoring charts and text-displayed monitoring metrics as needed.

    • Click add-dark on the left side of the page, set the metric parameters, then click check-dark to create text-displayed monitoring metrics.

      ParameterDescription

      Chart Name

      The name of the monitoring metric.

      Unit

      The unit of the metric data.

      Decimal Places

      The number of significant decimal places in the metric data.

      Monitoring Metric

      The monitoring metrics exposed by the application. You can click Monitoring Metric and then select a monitoring metric from the dropdown list, or manually enter a PromQL statement. Ensure that you have configured the application to expose monitoring metrics and have set up the monitoring exporter. For more information about PromQL expressions, see the Prometheus Documentation.

    • Click Add Monitoring Item in the lower right corner of the page, select Line Chart or Bar Chart, set the chart parameters, then click check-dark to create monitoring charts.

      ParameterDescription

      Graph Types

      The vertical data display method of the monitoring chart, with options including Basic Chart and Stacked Chart.

      Chart Colors

      The color scheme of the monitoring chart, with options including Default Colors, Cool Colors, and Warm Colors.

      Basic Information

      User-defined name and description for the monitoring chart.

      Data

      The monitoring metrics displayed in the monitoring chart.

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

      • Interval: The time interval of the data in the monitoring chart, with a value of <number><unit>, for example, 1m means the data time interval is 1 minute.

      • Monitoring Metric: The monitoring metrics exposed by the application. You can click Monitoring Metric and then select a monitoring metric from the dropdown list, or manually enter a PromQL statement. Ensure that you have configured the application to expose monitoring metrics and have set up the monitoring exporter. For more information about PromQL expressions, see the Prometheus Documentation.

      Y Axis

      Settings for the vertical axis of the monitoring chart.

      • Unit: The unit of the data on the vertical axis.

      • Decimal Places: The number of significant decimal places in the data on the vertical axis.

  6. Click Save Template in the upper right corner of the page. After the monitoring dashboard is created, it will be displayed in the custom monitoring dashboard list.

Receive the latest news, articles and updates from KubeSphere


Thanks for the feedback. If you have a specific question about how to use KubeSphere, ask it on Slack. Open an issue in the GitHub repo if you want to report a problem or suggest an improvement.

What’s on this Page