apiVersion: apps/v1
kind: Deployment
metadata:
name: productpage-v1
labels:
app: productpage
version: v1
spec:
replicas: 1
selector:
matchLabels:
app: productpage
version: v1
template:
metadata:
labels:
app: productpage
version: v1
annotations:
datakit/prom.instances: |
[[inputs.prom]]
url = “http://$IP:15020/stats/prometheus”
source = “ack-istio-product”
metric_types = [“counter”, “gauge”]
interval = “60s”
tags_ignore = [“cache”,”cluster_type”,”component”,”destination_app”,”destination_canonical_revision”,”destination_canonical_service”,”destination_cluster”,”destination_principal”,”group”,”grpc_code”,”grpc_method”,”grpc_service”,”grpc_type”,”reason”,”request_protocol”,”request_type”,”resource”,”responce_code_class”,”response_flags”,”source_app”,”source_canonical_revision”,”source_canonical-service”,”source_cluster”,”source_principal”,”source_version”,”wasm_filter”]
metric_name_filter = [“istio_requests_total”,”pilot_k8s_cfg_events”,”istio_build”,”process_virtual_memory_bytes”,”process_resident_memory_bytes”,”process_cpu_seconds_total”,”envoy_cluster_assignment_stale”,”go_goroutines”,”pilot_xds_pushes”,”pilot_proxy_convergence_time_bucket”,”citadel_server_root_cert_expiry_timestamp”,”pilot_conflict_inbound_listener”,”pilot_conflict_outbound_listener_http_over_current_tcp”,”pilot_conflict_outbound_listener_tcp_over_current_tcp”,”pilot_conflict_outbound_listener_tcp_over_current_http”,”pilot_virt_services”,”galley_validation_failed”,”pilot_services”,”envoy_cluster_upstream_cx_total”,”envoy_cluster_upstream_cx_connect_fail”,”envoy_cluster_upstream_cx_active”,”envoy_cluster_upstream_cx_rx_bytes_total”,”envoy_cluster_upstream_cx_tx_bytes_total”,”istio_request_duration_milliseconds_bucket”,”istio_request_duration_seconds_bucket”,”istio_request_bytes_bucket”,”istio_response_bytes_bucket”]
#measurement_prefix = “”
measurement_name = “istio_prom”
#[[inputs.prom.measurements]]
# prefix = “cpu_”
# name = “cpu”
[inputs.prom.tags]
namespace = “$NAMESPACE”
spec:
serviceAccountName: bookinfo-productpage
containers:
- name: productpage
image: docker.io/istio/examples-bookinfo-productpage-v1:1.16.2
imagePullPolicy: IfNotPresent
ports:
- containerPort: 9080
volumeMounts:
- name: tmp
mountPath: /tmp
volumes:
- name: tmp
emptyDir: {}

1
2
3

```plain
kubectl apply -f bookinfo.yaml

指标预览

1650605598834-b6b629b8-6915-4437-91b2-144da2b1ed05.png

APM 采集 (必选)

   新增 ASM 时,如果选择了**<font style="color:rgb(51, 51, 51);">自行搭建 Zipkin,</font>**则链路数据会被打到**<font style="color:rgb(51, 51, 51);"> </font>**<font style="color:rgb(23, 26, 29);">zipkin.istio-system的 Service上,且上报端口是 9411。在部署 DataKit 时已开通链路指标采集的 Zipkin 采集器,由于 DataKit 服务的名称空间是 datakit,端口是 9529,所以这里需要做一下转换,详情请参考</font>[Kubernetes 集群使用 ExternalName 映射 DataKit 服务](https://www.yuque.com/dataflux/bp/external-name)。创建后的 Service 如下图:

1647933840972-ba195f25-7031-4911-b6cd-885f4d1b6599.png

1647933808876-0dfc7f6f-5ff3-48b3-a2c3-a21227f6737a.png

链路预览

1647936152298-47a87e94-4b0c-42ac-bc7b-92341e494ca3.png

1647936165219-32fd9153-5f3e-4bc8-b493-78ddbd8d4771.png

日志采集 (非必选)

DataKit 默认的配置,采集容器输出到 /dev/stdout 的日志。更多关于日志的配置,请参考文章末尾的进一步阅读内容。

日志预览

1649829826360-2339ec73-269d-4fe8-8f06-fc3d7071d18a.png

插件标签 (非必选)

暂无

场景视图

场景 - 新建仪表板 - 阿里云 ASM Workload 监控视图

                          - 阿里云 ASM Mesh 监控视图

                          - 阿里云 ASM Control Plane 监控视图

                          - 阿里云 ASM Service 监控视图

相关文档 <DataFlux 场景管理>

指标详解

指标 描述 数据类型 单位
istio_agent_process_virtual_memory_bytes Virtual memory size in bytes int B
istio_agent_go_memstats_alloc_bytes Number of bytes allocated and still in use. int B
istio_agent_go_memstats_heap_inuse_bytes Number of heap bytes that are in use. int B
istio_agent_go_memstats_stack_inuse_bytes Number of bytes in use by the stack allocator. int B
istio_agent_go_memstats_last_gc_time_seconds Number of seconds since 1970 of last garbage collection int s
istio_agent_go_memstats_next_gc_bytes Number of heap bytes when next garbage collection will take place. int B
istio_agent_process_cpu_seconds_total Total user and system CPU time spent in seconds. int count
istio_agent_outgoing_latency The latency of outgoing requests (e.g. to a token exchange server, CA, etc.) in milliseconds. int count
istio_requests_total requests total. int
istio_agent_pilot_xds Number of endpoints connected to this pilot using XDS. int count
istio_agent_pilot_xds_pushes Pilot build and send errors for lds, rds, cds and eds. int count
istio_agent_pilot_xds_expired_nonce Total number of XDS requests with an expired nonce. int count
istio_agent_pilot_push_triggers Total number of times a push was triggered, labeled by reason for the push. int count
istio_agent_pilot_endpoint_not_ready Endpoint found in unready state. int count
envoy_cluster_upstream_cx_total envoy cluster upstream cx total int count
istio_agent_pilot_conflict_inbound_listener Number of conflicting inbound listeners int count
istio_agent_pilot_conflict_outbound_listener_http_over_current_tcp Number of conflicting wildcard http listeners with current wildcard tcp listener. int count
istio_agent_pilot_conflict_outbound_listener_tcp_over_current_tcp Number of conflicting tcp listeners with current tcp listener. int count
istio_agent_pilot_conflict_outbound_listener_tcp_over_current_http Number of conflicting wildcard tcp listeners with current wildcard http listener. int count