UiPath Documentation
automation-suite
2023.10
false
Linux 版 Automation Suite 安装指南
重要 :
新发布内容的本地化可能需要 1-2 周的时间才能完成。

如何启用 Istio 日志记录

启用 Istio 日志记录以调试 Automation Suite 中的入口网关行为并诊断流量问题。

要调试 Istio,您需要启用日志记录。为此,请执行以下步骤:

  1. 通过运行以下命令查找 istio-ingressgateway Pod。复制网关 Pod 名称。它应该类似于 istio-ingressgateway-r4mbx。
    kubectl -n istio-system get pods
    kubectl -n istio-system get pods
    
  2. 通过运行以下命令打开网关 Pod Shell。
    kubectl exec -it -n istio-system istio-ingressgateway-r4mbx bash
    kubectl exec -it -n istio-system istio-ingressgateway-r4mbx bash
    
  3. 通过运行以下命令启用调试级别的日志记录。
    curl -X POST http://localhost:15000/logging?level=debug
    curl -X POST http://localhost:15000/logging?level=debug
    
  4. 从服务器节点运行以下命令。
    istioctl_bin=$(find /var/lib/rancher/rke2/ -name "istioctl" -type f -perm -u+x   -print -quit)
    if [[ -n ${istioctl_bin} ]]
    then
    echo "istioctl bin found"
      kubectl -n istio-system get cm istio-installer-base -o go-template='{{ index .data "istio-base.yaml" }}'  > istio-base.yaml
      kubectl -n istio-system get cm istio-installer-overlay  -o go-template='{{ index .data "overlay-config.yaml" }}'  > overlay-config.yaml
      ${istioctl_bin} -i istio-system install -y -f istio-base.yaml -f overlay-config.yaml --set meshConfig.accessLogFile=/dev/stdout --set meshConfig.accessLogEncoding=JSON
    else
      echo "istioctl bin not found"
    fi
    istioctl_bin=$(find /var/lib/rancher/rke2/ -name "istioctl" -type f -perm -u+x   -print -quit)
    if [[ -n ${istioctl_bin} ]]
    then
    echo "istioctl bin found"
      kubectl -n istio-system get cm istio-installer-base -o go-template='{{ index .data "istio-base.yaml" }}'  > istio-base.yaml
      kubectl -n istio-system get cm istio-installer-overlay  -o go-template='{{ index .data "overlay-config.yaml" }}'  > overlay-config.yaml
      ${istioctl_bin} -i istio-system install -y -f istio-base.yaml -f overlay-config.yaml --set meshConfig.accessLogFile=/dev/stdout --set meshConfig.accessLogEncoding=JSON
    else
      echo "istioctl bin not found"
    fi
    

或者,要为单个服务而不是整个入口网关启用调试日志记录,请将以下批注添加到服务的部署中:

sidecar.istio.io/logLevel: debug
sidecar.istio.io/logLevel: debug
重要提示:

调试日志记录会显着增加日志数量。完成故障排除后,请禁用调试日志记录或删除批注,否则增加的日志量会填满可用存储空间。

此页面有帮助吗?

连接

需要帮助? 支持(opens in new window)

想要了解详细内容? UiPath Academy(opens in new window)

有问题? UiPath 论坛(opens in new window)

保持更新