- 概述
- 要求
- 安装
- 安装后
- 集群管理
- 监控和警示
- 使用监控堆栈
- 警示 runbook
- 迁移和升级
- 特定于产品的配置
- 最佳实践和维护
- 故障排除
- 如何在安装过程中对服务进行故障排除
- 如何卸载集群
- 如何清理离线工件以改善磁盘空间
- 如何清除 Redis 数据
- 如何启用 Istio 日志记录
- 如何手动清理日志
- 如何清理存储在 sf-logs 存储桶中的旧日志
- 如何禁用 AI Center 的流日志
- 如何对失败的 Automation Suite 安装进行调试
- 如何在升级后从旧安装程序中删除映像
- 如何自动清理 Longhorn 快照
- 如何禁用 TX 校验和卸载
- 如何手动将 ArgoCD 日志级别设置为 Info
- 如何为外部注册表生成已编码的 pull_secret_value
- 如何解决 TLS 1.2 中的弱密码问题
- 如何使用证书
- 如何使用集群内对象存储 (Ceph) 收集 DU 使用情况数据
- 如何在离线环境中安装 RKE2 SELinux
- 如何清理 NFS 服务器上的旧差异备份
- 无法获取沙盒映像
- Pod 未显示在 ArgoCD 用户界面中
- Redis 探测器失败
- RKE2 服务器无法启动
- 在 UiPath 命名空间中找不到密码
- ArgoCD 在首次安装后进入“进行中”状态
- 访问 ArgoCD 只读帐户时出现问题
- MongoDB Pod 处于 CrashLoopBackOff 状态或在删除后处于“等待 PVC 配置”状态
- 集群还原或回滚后服务运行状况不佳
- Pod 在 Init:0/X 中卡住
- Prometheus 处于 CrashLoopBackoff 状态,并出现内存不足 (OOM) 错误
- 监控仪表板中缺少 Ceph-rook 指标
- Pod 无法在代理环境中与 FQDN 通信
- 无法配置升级后的电子邮件警示
- 无正常的上游问题
- 使用 Automation Suite 诊断工具
- 使用 Automation Suite 支持捆绑包
- 探索日志
使用监控堆栈
Automation Suite 集群的监控堆栈包括集成在 Rancher Cluster Explorer 用户界面中的 Prometheus、Grafana 和 Alertmanager。
节点故障可能会导致 Kubernetes 关闭,从而中断 Prometheus 警示。为防止出现这种情况,我们建议在 RKE2 服务器上设置单独的警示。
This page describes a series of monitoring scenarios. For more details, see the official Rancher documentation on using Rancher Monitoring.
使用收集器将指标导出到第三方工具时,如果启用应用程序监控,可能会中断 Automation Suite 的正常运行。
访问监控工具
概述
Automation Suite 集群的监控堆栈包括 Prometheus、Grafana、Alert Manager 和 Longhorn Dashboard。
本页描述了一系列监控方案。
For more details, see the official Rancher documentation on using Rancher Monitoring.
您可以使用以下 URL 单独访问 Automation Suite 监控工具:
| 应用程序 | 工具 | URL | 示例 |
|---|---|---|---|
| 指标 | Prometheus | https://monitoring.fqdn/metrics | https://monitoring.automationsuite.mycompany.com/metrics |
| 仪表板 | Grafana | https://monitoring.fqdn/dashboard | https://monitoring.automationsuite.mycompany.com/dashboard |
| 警示管理 | 警示管理器 | https://monitoring.fqdn/alertmanager | https://monitoring.automationsuite.mycompany.com/alertmanager |
| 暂留块存储 | Longhorn 仪表板 | https://monitoring.fqdn | https://monitoring.automationsutie.mycompany.com |
监控工具身份验证
首次访问监控工具时,请使用以下默认凭据以管理员身份登录:
-
用户名: admin
-
密码:要检索密码,请运行以下命令:
kubectl get secrets/dex-static-credential -n uipath-auth -o "jsonpath={.data['password']}" | base64 -dkubectl get secrets/dex-static-credential -n uipath-auth -o "jsonpath={.data['password']}" | base64 -d
Dex 身份验证
要在访问监控工具时更新用于 Dex 身份验证的默认密码,请执行以下步骤。
Dex 是基于监控工具的基本身份验证方法。 因此,更新 Dex 密码不会影响监控工具的密码。 在这种情况下,监控工具的密码将与以前相同。
-
通过将
newpassword替换为您的新密码来运行以下命令:password="newpassword" password=$(echo -n $password | base64) kubectl patch secret dex-static-credential -n uipath-auth --type='json' -p="[{'op': 'replace', 'path': '/data/password', 'value': '$password'}]"password="newpassword" password=$(echo -n $password | base64) kubectl patch secret dex-static-credential -n uipath-auth --type='json' -p="[{'op': 'replace', 'path': '/data/password', 'value': '$password'}]" -
通过将
<cluster_config.json>替换为配置文件的路径来运行以下命令:/opt/UiPathAutomationSuite/UiPath_Installer/install-uipath.sh -i <cluster_config.json> -f -o output.json --accept-license-agreement/opt/UiPathAutomationSuite/UiPath_Installer/install-uipath.sh -i <cluster_config.json> -f -o output.json --accept-license-agreement
Checking currently firing alerts
要查看警示,请使用https://monitoring.fqdn/metrics导航到 Prometheus,然后选择“警示”选项卡。您可以在此处看到 Automation Suite 中配置的所有警示。
To view the active alerts, filter the alert status by selecting the Firing checkbox and the Show annotations checkbox at the top. Here you can see all the alerts that are firing currently and their corresponding messages.
静默警示
如果警示过于嘈杂,您可以将其静音。为此,请执行以下步骤:
-
选择监控仪表板左上角的“警示管理器”图块。显示以下消息:
-
找到相关警示,然后选择“静默”。
-
填写“创建者”和“注释”详细信息,然后选择“创建” 。警示应该不会再显示在监控仪表板上,也应该不会报告给任何已配置的收件人。
配置警示
Before starting configuring the alerts, make sure to enable kubectl.
添加新的电子邮件配置
要在安装后添加新的电子邮件配置,请运行以下命令:
./uipathctl config alerts add-email \
--name test \
--to "admin@example.com" \
--from "admin@example.com" \
--smtp server.mycompany.com \
--username admin \
--password somesecret \
--require-tls \
--ca-file <path_to_ca_file> \
--cert-file <path_to_cert_file> \
--key-file <path_to_key_file> \
--send-resolved
./uipathctl config alerts add-email \
--name test \
--to "admin@example.com" \
--from "admin@example.com" \
--smtp server.mycompany.com \
--username admin \
--password somesecret \
--require-tls \
--ca-file <path_to_ca_file> \
--cert-file <path_to_cert_file> \
--key-file <path_to_key_file> \
--send-resolved
| 标记 | 描述 | 示例 |
|---|---|---|
name | 电子邮件配置名称 | testconfig |
to | 收件人的电子邮件地址 | admin@example.com |
from | 发件人的电子邮件地址 | admin@example.com |
SMTP | SMTP 服务器 URL 或 IP 地址和端口号 | server.mycompany.com:567 |
username | 身份验证用户名 | admin |
password | 身份验证密码 | securepassword |
require-tls | 表示已在 SMTP 服务器上启用 TLS 的布尔值标志。 | 不适用 |
ca-file | 包含 SMTP 服务器的 CA 证书的文件路径。如果 CA 为私有,则这是可选项。 | ./ca-file.crt |
cert-file | 包含 SMTP 服务器证书的文件路径。如果证书为私有,则这是可选项。 | ./cert-file.crt |
key-file | 包含 SMTP 服务器 CA 证书的文件路径。如果证书是私有,则这是必需项。 | ./key-file.crt |
send-resolved | 解决警示后发送电子邮件的布尔值标志。 | 不适用 |
删除电子邮件配置
要删除电子邮件配置,您必须运行以下命令。确保传递要删除的电子邮件配置的名称。
./uipathctl config alerts remove-email --name test
./uipathctl config alerts remove-email --name test
更新电子邮件配置
要更新电子邮件配置,您必须运行以下命令。确保传递要更新的电子邮件配置的名称以及要编辑的其他可选参数。这些参数与添加新电子邮件配置的参数相同。您可以同时传递一个或多个标志。
./uipathctl config alerts update-email --name test [additional_flags]
./uipathctl config alerts update-email --name test [additional_flags]
访问 Grafana 仪表板
要访问 Grafana 仪表板,您必须检索凭据并使用它们进行登录:
-
用户名:
kubectl -n cattle-monitoring-system get secrets/rancher-monitoring-grafana -o "jsonpath={.data.admin-user}" | base64 -d; echokubectl -n cattle-monitoring-system get secrets/rancher-monitoring-grafana -o "jsonpath={.data.admin-user}" | base64 -d; echo -
密码:
kubectl -n cattle-monitoring-system get secrets/rancher-monitoring-grafana -o "jsonpath={.data.admin-password}" | base64 -d; echokubectl -n cattle-monitoring-system get secrets/rancher-monitoring-grafana -o "jsonpath={.data.admin-password}" | base64 -d; echo
Monitoring the Service Mesh
您可以通过以下 Grafana 仪表板监控 Istio 服务网格:Istio 网格和 Istio 工作负载。
Istio 网格仪表板
此仪表板显示所选时间段内整个服务网格的整体请求量以及 400 和 500 错误率。数据显示在窗口的右上角。有关此信息,请参阅顶部的 4 张图表。
它还显示每项服务在过去一分钟内的即时成功率。请注意,成功率为 NaN 表示该服务当前未提供流量。
Istio 工作负载仪表板
此仪表板显示窗口右上角所选时间范围内的流量指标。
使用仪表板顶部的选取器深入了解特定的工作负载。特别值得一提的是 UiPath 命名空间。
顶部显示整体指标,“入站工作负载”部分根据来源分离流量,“出站服务”部分根据目标分离流量。
监控持久卷
您可以通过 Kubernetes/持久卷仪表板监控持久卷。您可以跟踪每个卷的可用空间和已用空间。
您还可以通过选择Cluster Explorer的“存储”菜单中的“持久卷”项目来检查每个卷的状态。
监控硬件利用率
要检查每个节点的硬件利用率,您可以使用节点仪表板。可以使用 CPU、内存、磁盘和网络上的数据。
您可以使用 Kubernetes/计算资源/命名空间(工作负载)仪表板监控特定工作负载的硬件利用率。选择 UiPath 命名空间以获取所需的数据。
创建可共享的 Grafana 图表可视化快照
- 选择图表标题旁边的向下箭头,然后选择“共享” 。
- 选择“快照”选项卡,然后设置“快照名称” 、 “过期”和“超时” 。
- 选择“发布到快照.raintank.io”。
有关更多详细信息,请参阅有关共享仪表板的 Grafana 文档。
任何知道此链接的人都可以在公共互联网上查看此快照。
创建自定义持久性 Grafana 仪表板
For details on how to create custom persisten Grafana dashboards, see Rancher documentation.
对 Grafana 的管理员访问权限
在 Automation Suite 集群中,通常不需要对 Grafana 的管理员访问权限,因为在默认情况下,匿名用户可以读取访问仪表板,而创建自定义持久性仪表板必须使用本文档前面链接的 Kubernetes 原生说明。
不过,使用以下说明可以对 Grafana 进行管理员访问。
可以按如下方式检索 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
请注意,在高可用性 Automation Suite 集群中存在多个 Grafana Pod,以便在节点出现故障以及进行大量读取查询时实现不间断的读取访问。 这与管理员访问权限不兼容,因为 Pod 不共享会话状态,并且登录需要它。 为了解决此问题,需要管理员访问权限时,必须将 Grafana 副本的数量临时增加到 1。 请参阅有关如何扩展 Grafana 副本数量的说明:
# 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
查询 Prometheus
On the Monitoring Dashboard, select Prometheus Graph. A new window is displayed.
有关可用指标的文档如下:
- https://github.com/prometheus/node_exporter#enabled-by-default - 连接到预览
- https://github.com/kubernetes/kube-state-metrics/tree/master/docs#exposed-metrics - 连接预览
- 从 Prometheus (Istio) 查询指标
创建自定义警示
您可以使用带有布尔值表达式的 Prometheus 查询创建自定义警示。
- To do so, select Prometheus Rules in the Advanced menu of the Monitoring Dashboard.
- Select Create in the upper-right corner of the window to create a new alert, and follow the Rancher documentation: PrometheusRules
- 当警示触发时,它应显示在监控仪表板上。此外,它将路由到任何已配置的接收器。
监控 Kubernetes 资源状态
要查看 Pod、部署、状态副本集等的状态,可以使用 Cluster Explorer 用户界面。这与登录到 Rancher-Server 端点后访问的登录页面相同。主页将显示摘要,并在左侧向下钻取每种资源类型的特定详细信息。请注意页面顶部的命名空间选取器。此仪表板也可以替换为 Lens 工具。
将 Prometheus 指标导出到外部系统
Prometheus 使用 Prometheus 远程写入功能收集 Prometheus 指标并将其导出到外部系统。
UiPath™ 不支持或维护远程写入端点集成。但是,端点与 Automation Suite 中提供的 Prometheus 实例兼容。
要在 Automation Suite 集群上配置remote_write ,请执行以下操作:
-
选择“应用程序” 。
-
导航到Fabric-installer(在 Studio 中配置)。
-
打开“应用程序详细信息”面板并禁用“自我修复” 。
-
导航到 rancher-monitoring 应用程序。
-
打开“应用程序详细信息”面板 > “清单”选项卡。
-
选择“编辑” ,然后导航到“值” > “Prometheus ” > “Prometheus 规范”部分。
-
添加所需的
remoteWrite配置。发现 远程写入功能的可用配置。
-
“保存”新配置。在应用新配置之前,rancher-monitoring 应用程序将显示“无法同步”。
备注:Prometheus无需重新启动即可应用新的远程写入配置。
-
测试所需的远程写入集成。返回到步骤 8 以添加新配置。