Create a Custom Monitoring Dashboard
This section describes how to create 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.
-
You need to configure the application running in the container to expose monitoring metrics that comply with the Prometheus specification at a certain service endpoint. For more information, please refer to the Prometheus official documentation.
-
You need to set up a metrics exporter on the service used to expose the workload to declare the path that provides application monitoring metrics. KubeSphere will obtain the application’s monitoring metrics based on the relevant parameters of the metrics exporter. For more information, please refer to Edit a Metrics Exporter.
Steps
-
Log in to the KubeSphere web console as a user with Monitoring Management permissions and enter your cluster or workspace.
-
Click Monitoring & Alerting > Custom Monitoring in the left navigation pane.
-
Click Create on the page.
-
In the Create Custom Monitoring Dashboard dialog box, set the name, description, and template for the monitoring dashboard, then click Next.
Parameter Description 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 for the custom monitoring dashboard.
-
KubeSphere provides templates with pre-configured custom monitoring dashboards for Elasticsearch, MySQL, Redis, Jenkins, and GPU. Each template provides some pre-configured monitoring metrics and charts, which you can customize based on the template to reduce operations.
-
To use a Grafana monitoring dashboard, you need to upload a Grafana monitoring dashboard configuration file.
-
You can also select Custom to use an empty template.
-
-
On the custom monitoring dashboard editing page, set up monitoring charts and text-based monitoring metrics as needed.
-
On the left side of the page, click
, set the metric parameters, then click
to create a text-based 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.
-
In the lower right corner of the page, click Add Monitoring Item, select Line Chart or Bar Chart, set the chart parameters, then click
to create 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.
-
-
-
In the upper right corner of the page, click Save Template. After the monitoring dashboard is created, it will be displayed in the custom monitoring dashboard list.