Huawei Cloud ASM
Collect metrics and trace data from Huawei Cloud ASM
Configuration¶
Prerequisites¶
Application Service Mesh (ASM) is a service mesh platform launched by Huawei Cloud based on the open-source Istio. It integrates seamlessly with Huawei Cloud's enterprise Kubernetes cluster service CCE.
Before using ASM, you need to have purchased a CCE cluster and installed DataKit
on the CCE cluster.
Trace Collection¶
Enable OpenTelemetry Collector¶
Refer to the documentation for accessing the OpenTelemetry
collector.
Adjust the ENV_DEFAULT_ENABLED_INPUTS
parameter in the ENV module and append the value opentelemetry
, as shown below:
- name: ENV_DEFAULT_ENABLED_INPUTS
value: dk,cpu,disk,diskio,mem,swap,system,hostobject,net,host_processes,container,opentelemetry
Modify Istio Sampling Rate¶
For easier testing, first modify the sampling rate of Istio:
# kubectl edit -n istio-system cm istio-1-15-5-r4
...
sampling: 100 # Change this parameter from the original value of 1 to 100
...
Adjust Otel Endpoint¶
# kubectl edit -n monitoring cm otel-collector-conf
...
exporters:
apm:
address: "100.125.0.78:8923"
project_id: f5f4c067d68b4b3aad86e173b18367bf
cluster_id: 5f642ce9-4aca-11ee-9dbd-0255ac10024d
otlp: # Add new otlp output
endpoint: "http://datakit-service.datakit:4317"
tls:
insecure: true
compression: none # Disable gzip
...
traces/apm:
receivers: [ zipkin ]
processors: [ memory_limiter, batch ]
exporters: [ otlp ] # Change exporter to otlp
Metrics Collection¶
Below are adjustments to the DataKit configuration file datakit.yaml
.
- Enable
Prometheus
Collector
To enable the Prometheus
data collection in DataKit, refer to Prometheus. The configmap is as follows:
prom.conf: |
[[inputs.prom]]
urls = ["http://istiod.istio-system:15014/metrics"] ##istiod address
uds_path = ""
ignore_req_err = false
source = "prom"
measurement_prefix = ""
measurement_name = "istio_prom"
- Mount Configuration File
- Deploy DataKit