Volcengine Managed Service for Prometheus (VMP) allows you to access the metrics of Tencent Cloud services by using exporters. This topic describes how to deploy the Tencent Cloud exporter in a Volcengine Kubernetes Engine (VKE) cluster to monitor Tencent Cloud services.
Background
Basic information
The open source monitoring exporter (qcloud exporter) can automatically export the metrics of Tencent Cloud services in the Prometheus format. You can use VMP to pull the metrics exported by the qcloud exporter to monitor Tencent Cloud resources on Volcano Engine.
Collection configuration
You can perform the following configuration to define the collection configuration and metric conversion features of the Tencent Cloud exporter:
When you perform the configuration, you mainly modify the following content:
- Configure the credential authentication information of the cloud API, including access_key, secret_key, and region.
- Configure products metrics and instance exported information.
For example, if you need to collect and export the metric information of all instances for TencentDB for MongoDB, you can configure the following settings:
Prerequisites
- A Volcano Engine root user has been created, and VKE has been activated.
- The VKE cluster has been integrated with VMP. For details, see VKE integration.
Configuration procedure
Step 1: Build an image of the Tencent Cloud exporter
- Run the following command to build an image of the Tencent Cloud exporter, which facilitates the deployment of the exporter in the VKE cluster:
Step 2: Deploy the exporter in the cluster
- Click Cluster in the left navigation pane.
- On the cluster list page, click the target cluster that you want to configure.
- In the left navigation bar of the cluster details page, click Configurations > ConfigMap. On the page that appears, click Create with Yaml to configure the exporter. Modify the access_key, secret_key, and region fields based on your business requirements. For more details about parameters, refer to Collection configuration.
tip
Modify the credential authentication information of the cloud API in the preceding configurations, including access_key, secret_key, and region.
- In the left navigation bar of the cluster details page, click Workload > Deployment. On the page that appears, click Create with Yaml to deploy the exporter in the cluster.
- In the left navigation bar of the cluster details page, click Services and Ingresses > Service. On the page that appears, click Create with Yaml to configure the service that corresponds to the exporter.
Step 3: Configure a collection rule
- In the left navigation bar of the cluster details page, click Workload > Resource Explorer. On the page that appears, click Create with Yaml to configure the collection rule through ServiceMonitor.
- Select Custom from the Type drop-down menu.
- Enter the YAML configuration in the Yaml field.
Validate results
You can view metric data by using the Explore feature of VMP. For more details, refer to Querying metrics.