Configuring Custom Metrics Using the Telemetry API (v1.18 to v1.28)
Scenarios
Starting from v1.28, ASM uses the Telemetry API to manage sidecar metrics. Custom metrics configured in IOP v1.18 are not inherited after the upgrade. Instead, ASM preset metric templates are applied.
This section provides an example of configuring custom metrics using the Telemetry API. Prepare a Telemetry API configuration file as needed and apply it to the CCE cluster after the upgrade.
Procedure
- The following IOP configuration is used as an example. In this configuration, customize four tags and remove two.
spec: values: telemetry: enabled: true v2: enabled: true prometheus: configOverride: gateway: http: metrics: - name: requests_total dimensions: destination_cluster: upstream_peer.cluster_id destination_port: string(upstream.port) source_cluster: node.metadata['CLUSTER_ID'] source_pod: node.metadata['NAME'] tags_to_remove: - response_flags - source_principal - Check the corresponding Telemetry API configuration file.
apiVersion: telemetry.istio.io/v1 kind: Telemetry metadata: name: custom-tag namespace: istio-system spec: metrics: - providers: - name: prometheus overrides: - match: metric: REQUEST_COUNT mode: CLIENT tagOverrides: destination_cluster: value: filter_state.upstream_peer.cluster destination_port: value: string(upstream.port) source_cluster: value: xds.node.metadata['CLUSTER_ID'] source_pod: value: xds.node.metadata['NAME'] response_flags: operation: REMOVE source_principal: operation: REMOVE - Run the following command in the CCE cluster to create the configuration:
kubectl apply -f telemetry-custom-tag.yaml -n istio-system
Helpful Links
For more information about the Telemetry API, see the Istio official documentation Telemetry API - Metrics.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot