This section describes how to edit a monitoring exporter.

Monitoring exporters are used to monitor applications. The monitoring and alerting functionality of the KubeSphere platform is implemented using Prometheus at its core. To monitor the health status of your applications, you need to perform the following operations:

  1. Configure the application running in the container to expose monitoring metrics that comply with the Prometheus specification at a specific service endpoint. For more information, refer to the Prometheus official documentation.

  2. In the KubeSphere web console, set up a monitoring exporter on the service used to expose the workload to declare the path that provides the application’s monitoring metrics. KubeSphere will retrieve the application’s monitoring metrics based on the relevant parameters of the monitoring exporter.

  3. In the KubeSphere web console, create rule groups or custom monitoring dashboards using monitoring metrics to monitor the health status of applications.

Prerequisites

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

  • You need to configure the target application to expose monitoring metrics that comply with the Prometheus specification at a specific service endpoint. For more information, refer to the Prometheus official documentation.

  • If authentication is required during the monitoring metrics collection process, you also need to configure the relevant authentication logic in the target application and create a Secret containing the authentication information in the KubeSphere platform in advance.

Steps

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

  2. Click Application Workloads > Services in the left navigation pane.

  3. In the service list, click the name of a service to open its details page.

  4. On the service details page, select Operation > Edit Monitoring Exporter.

  5. On the Edit Monitoring Exporter page, configure the collection path, collection interval, and timeout for the monitoring metrics, then click OK.

    KubeSphere’s monitoring and alerting module will access the service and collect the application’s monitoring metrics based on the parameters set here.

    Parameter Description

    Protocol

    The protocol used for communication. The value can be HTTP or HTTPS.

    Port

    The service port used for communication.

    Path

    The path where the application’s monitoring metrics are exposed.

    Authentication Method

    The communication authentication method for the process of collecting application monitoring metrics.

    • No Authentication: No authentication method is used. This method may have security risks.

    • TLS: The process of collecting application monitoring metrics is authenticated via the TLS protocol.

    • Bearer Token: Authentication is performed via a token.

    • Basic Authentication: Authentication is performed via username and password.

    Except for No Authentication, other authentication methods require configuring corresponding authentication logic in the application and creating a Secret containing the authentication information in advance.

    Collection Interval

    The collection interval for application monitoring metrics, in minutes.

    Timeout

    The timeout for each collection of application monitoring metrics, in seconds.

Note

After the monitoring exporter is created, you also need to use the monitoring metrics in the KubeSphere web console to further create rule groups or custom monitoring dashboards to monitor the application’s operational status.