Istio Observability 可观察

发布时间: 更新时间: 总字数:515 阅读时间:2m 作者: IP上海 分享 网址

Istio 提供健壮的跟踪、监视和日志功能,可以通过自定义仪表盘支持对所有服务的性能观测。

介绍

可观测内容包括:

  • Metrics:Envoy 内置和自定义的指标,可以通过 grafana 展示
  • Distributed Traces:Istio 为所有服务生成分布式跟踪的 span,可以生成数据量和服务依赖关系。如通过 Jaeger、zipkin展示
  • Access Logs:Istio 通过 Envoy 提供详细的日志信息,可供故障排除

使用

支持的观测内容:

  • controlz Open ControlZ web UI
  • envoy Open Envoy admin web UI
  • grafana Open Grafana web UI
  • jaeger Open Jaeger web UI
  • kiali Open Kiali web UI
  • prometheus Open Prometheus web UI
  • skywalking Open SkyWalking UI
  • zipkin Open Zipkin web UI

help

$ istioctl dashboard -h
Access to Istio web UIs

Usage:
  istioctl dashboard [flags]
  istioctl dashboard [command]

Aliases:
  dashboard, dash, d

Available Commands:
  controlz    Open ControlZ web UI
  envoy       Open Envoy admin web UI
  grafana     Open Grafana web UI
  jaeger      Open Jaeger web UI
  kiali       Open Kiali web UI
  prometheus  Open Prometheus web UI
  skywalking  Open SkyWalking UI
  zipkin      Open Zipkin web UI

Flags:
      --address string   Address to listen on. Only accepts IP address or localhost as a value. When localhost is supplied, istioctl will try to bind on both 127.0.0.1 and ::1 and will fail if neither of these address are available to bind. (default "localhost")
      --browser          When --browser is supplied as false, istioctl dashboard will not open the browser. Default is true which means istioctl dashboard will always open a browser to view the dashboard. (default true)
  -h, --help             help for dashboard
  -p, --port int         Local port to listen to

Global Flags:
      --context string      The name of the kubeconfig context to use
  -c, --kubeconfig string   Kubernetes configuration file
  -n, --namespace string    Config namespace
      --vklog Level         number for the log level verbosity. Like -v flag. ex: --vklog=9

Use "istioctl dashboard [command] --help" for more information about a command.

controlz 示例

root@k8s-master:~# kubectl -n istio-system get pod
NAME                                    READY   STATUS    RESTARTS   AGE
istio-egressgateway-579dc4df64-dtwms    1/1     Running   0          20h
istio-ingressgateway-679bf9454b-7m4hh   1/1     Running   0          20h
istiod-8675d9c57b-jwswg                 1/1     Running   0          20h
root@k8s-master:~# istioctl dashboard controlz istiod-8675d9c57b-jwswg -n istio-system --address 172.20.0.241
http://172.20.0.241:9876

说明:

  • --address 指定 k8s node 地址
  • 访问 http://172.20.0.241:9876 打开 ControlZ web UI

envoy 示例

root@k8s-master:~# istioctl dashboard envoy site1-5b7488d74f-2h5k7 -n default --address 172.20.0.241
http://172.20.0.241:15000

Access Logs

kubectl logs -f site1-5b7488d74f-2h5k7 -c istio-proxy
  • 修改日志配置信息
kubectl edit -n istio-system cm istio

参考

  1. https://istio.io/latest/docs/concepts/observability/
Home Archives Categories Tags Statistics
本文总阅读量 次 本站总访问量 次 本站总访客数