- 概述
- 要求
- 安装
- 安装后
- 集群管理
- 监控和警示
- 使用监控堆栈
- 警示 runbook
- 迁移和升级
- 特定于产品的配置
- 最佳实践和维护
- 故障排除

Automation Suite installation guide
使用监控堆栈
Automation Suite 集群的监控堆栈包括集成在 Rancher Cluster Explorer 用户界面中的 Prometheus、Grafana 和 Alertmanager。
节点故障可能会导致 Kubernetes 关闭,从而中断 Prometheus 警示。为防止出现这种情况,我们建议在 RKE2 服务器上设置单独的警示。
本页描述了一系列监控方案。有关更多详细信息,请参阅有关使用 Rancher 监控的官方 Rancher 文档。
使用收集器将指标导出到第三方工具时,如果启用应用程序监控,可能会中断 Automation Suite 的正常运行。
强烈建议您设置外部警示接收器。这样,警示将在发生时推送,您无需刷新监控仪表板即可查看最新的警示。
有关如何向外部接收器发送警示的详细信息,请参阅警示管理器接收器配置的相关 Rancher 文档。
除了接收器外,您还必须配置至少一个使用该接收器的路由。路由定义了警示的分组方式,以及会将哪些警示发送给接收器。请参阅 Rancher 文档中的警示管理器路由配置。
有关使用 Slack 接收器时如何显示警示的示例,请参见下文。单击“警示管理器”的链接将带您进入警示管理器控制台,在该控制台中您可以将警示静音,并且还有触发警示的 Prometheus 表达式的更多链接。单击 Runbook URL 将转到此页面,其中包含特定的修复说明。向其他外部接收器发送警示时,也会显示这些链接。
您可以通过以下 Grafana 仪表板监控 Istio 服务网格:Istio 网格和 Istio 工作负载。
此仪表板显示所选时间段内整个服务网格的整体请求量以及 400 和 500 错误率。数据显示在窗口的右上角。有关此信息,请参阅顶部的 4 张图表。
它还显示每项服务在过去一分钟内的即时成功率。请注意,成功率为 NaN 表示该服务当前未提供流量。
您可以通过 Kubernetes/持久卷仪表板监控持久卷。您可以跟踪每个卷的可用空间和已用空间。
您还可以通过单击 Cluster Explore 的“存储”菜单中的“持久卷”项目来检查每个卷的状态。
要检查每个节点的硬件利用率,您可以使用节点仪表板。可以使用 CPU、内存、磁盘和网络上的数据。
您可以使用 Kubernetes/计算资源/命名空间(工作负载)仪表板监控特定工作负载的硬件利用率。选择 UiPath 命名空间以获取所需的数据。
- Select the downwards pointing arrow next to the chart title, and then select Share.
- Select the Snapshot tab, and set the Snapshot name,Expire, and Timeout.
- Select Publish to snapshot.raintank.io.
有关更多详细信息,请参阅有关共享仪表板的 Grafana 文档。
有关如何创建自定义持久性 Grafana 仪表板的详细信息,请参阅 Rancher 文档。
Admin access to Grafana is not typically needed in Automation Suite clusters as dashboards are available for read access by default to anonymous users, and creating custom persistent dashboards must be created using the Kubernetes-native instructions previously linked in this document.
Nonetheless, admin access to Grafana is possible with the following instructions.
可以按如下方式检索 Grafana 管理员访问权限的默认用户名和密码:
kubectl get secret -n cattle-monitoring-system rancher-monitoring-grafana -o jsonpath='{.data.admin-user}' | base64 -d && echo
kubectl get secret -n cattle-monitoring-system rancher-monitoring-grafana -o jsonpath='{.data.admin-password}' | base64 -d && echo
kubectl get secret -n cattle-monitoring-system rancher-monitoring-grafana -o jsonpath='{.data.admin-user}' | base64 -d && echo
kubectl get secret -n cattle-monitoring-system rancher-monitoring-grafana -o jsonpath='{.data.admin-password}' | base64 -d && echo
Note that in High Availability Automation Suite clusters, there are multiple Grafana pods in order to enable uninterrupted read access in case of node failure, as well as a higher volume of read queries. This is incompatible with admin access because the pods do not share session state and logging in requires it. In order to work around this, the number of Grafana replicas must be temporarily scaled to 1 while admin access is desired. See the instructions on how to scale the number of Grafana replicas:
# scale down
kubectl scale -n cattle-monitoring-system deployment/rancher-monitoring-grafana --replicas=1
# scale up
kubectl scale -n cattle-monitoring-system deployment/rancher-monitoring-grafana --replicas=2
# scale down
kubectl scale -n cattle-monitoring-system deployment/rancher-monitoring-grafana --replicas=1
# scale up
kubectl scale -n cattle-monitoring-system deployment/rancher-monitoring-grafana --replicas=2
要查看 Pod、部署、状态副本集等的状态,可以使用 Cluster Explorer 用户界面。这与登录到 Rancher-Server 端点后访问的登录页面相同。主页将显示摘要,并在左侧向下钻取每种资源类型的特定详细信息。请注意页面顶部的命名空间选取器。此仪表板也可以替换为 Lens 工具。
Prometheus 使用 Prometheus 远程写入功能收集 Prometheus 指标并将其导出到外部系统。
要在 Automation Suite 集群上配置 remote_write
,请执行以下操作: