UiPath Documentation
automation-suite
2022.4
false
Automation Suite 安装指南
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

使用监控堆栈

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 的正常运行。

访问 Rancher 监控仪表板​

  1. 通过 https://monitoring.{cluster_host} 访问 Rancher Cluster Explorer。系统提示何种屏幕取决于您是否是第一次连接 Rancher Server。

  2. 输入密码。两种情况下的密码都相同。可以使用以下命令来完成此操作:

    kubectl get secret -n cattle-system rancher-admin-password -o jsonpath='{.data.password}' | base64 -d && echo
    kubectl get secret -n cattle-system rancher-admin-password -o jsonpath='{.data.password}' | base64 -d && echo
    

  3. 单击 Rancher Server 主页上的“本地”链接,打开 Cluster Explorer。

  4. 单击侧边栏上的“监控”菜单。

检查当前触发的警示​

在监控仪表板中,检查底部窗格中是否有当前触发的警示。以下屏幕截图显示了当前触发的几个警示。

静默警示​

如果警示过于嘈杂,您可以将其静音。为此,请执行以下步骤:

  1. 选择监控仪表板左上角的“警示管理器”图块。显示以下消息:

  2. 找到相关警示,然后选择“静默”。

  3. 填写“创建者”和“注释”详细信息,然后选择“创建” 。警示应该不会再显示在监控仪表板上,也应该不会报告给任何已配置的收件人。

向外部接收器发送警示​

强烈建议您设置外部警示接收器。这样,警示将在发生时推送,您无需刷新监控仪表板即可查看最新的警示。

For details on how to send alerts to an external receiver, see the Rancher documentation on Alertmanager Receiver Configuration.

In addition to a receiver, you must configure at least one route that uses that receiver. A route defines how alerts are grouped, and which alerts are sent to the receiver. See the Rancher documentation on Alertmanager Route Configuration.

See below for an example of how the alerts will be displayed when using the Slack receiver. Clicking the link to AlertManager will take you to the AlertManager console where alerts can be silenced and there are further links to the Prometheus expression that triggered the alert. Clicking the Runbook URL will take you to this page with specific remediation instructions. These links are also present when alerts are sent to other external receivers.

访问 Grafana 仪表板​

On the Monitoring dashboard, click the Grafana tile. The Grafana dashboard is now displayed.

监控服务网格​

您可以通过以下 Grafana 仪表板监控 Istio 服务网格:Istio 网格和 Istio 工作负载。

Istio 网格仪表板​

此仪表板显示所选时间段内整个服务网格的整体请求量以及 400 和 500 错误率。数据显示在窗口的右上角。有关此信息,请参阅顶部的 4 张图表。

它还显示每项服务在过去一分钟内的即时成功率。请注意,成功率为 NaN 表示该服务当前未提供流量。

Istio 工作负载仪表板​

此仪表板显示窗口右上角所选时间范围内的流量指标。

使用仪表板顶部的选取器深入了解特定的工作负载。特别值得一提的是 UiPath 命名空间。

顶部显示整体指标,“入站工作负载”部分根据来源分离流量,“出站服务”部分根据目标分离流量。

监控持久卷​

您可以通过 Kubernetes/持久卷仪表板监控持久卷。您可以跟踪每个卷的可用空间和已用空间。

您还可以通过单击 Cluster Explore 的“存储”菜单中的“持久卷”项目来检查每个卷的状态。

监控硬件利用率​

要检查每个节点的硬件利用率,您可以使用节点仪表板。可以使用 CPU、内存、磁盘和网络上的数据。

您可以使用 Kubernetes/计算资源/命名空间(工作负载)仪表板监控特定工作负载的硬件利用率。选择 UiPath 命名空间以获取所需的数据。

创建可共享的 Grafana 图表可视化快照​

  1. 选择图表标题旁边的向下箭头,然后选择“共享” 。
  2. 选择“快照”选项卡,然后设置“快照名称” 、 “过期”和“超时” 。
  3. 选择“发布到快照.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, click Prometheus Graph. A new window is displayed.

有关可用指标的文档如下:

创建自定义警示​

您可以使用带有布尔值表达式的 Prometheus 查询创建自定义警示。

  1. 为此,请在监控仪表板的“高级”菜单中单击“Prometheus 规则”。

  2. Click Create in the upper-right corner of the window to create a new alert, and follow the Rancher documentation: PrometheusRules

  3. 当警示触发时,它应显示在监控仪表板上。此外,它将路由到任何已配置的接收器。

监控 Kubernetes 资源状态​

要查看 Pod、部署、状态副本集等的状态,可以使用 Cluster Explorer 用户界面。这与登录到 Rancher-Server 端点后访问的登录页面相同。主页将显示摘要,并在左侧向下钻取每种资源类型的特定详细信息。请注意页面顶部的命名空间选取器。此仪表板也可以替换为 Lens 工具。

将 Prometheus 指标导出到外部系统​

Prometheus 使用 Prometheus 远程写入功能收集 Prometheus 指标并将其导出到外部系统。

备注:

UiPath does not support or maintain the remote write endpoint integrations. However, the endpoints are compatible with the Prometheus instance delivered within Automation Suite.

要在 Automation Suite 集群上配置remote_write ,请执行以下操作:

  1. Click Applications.

  2. 导航到Fabric-installer(在 Studio 中配置)。

  3. 打开“应用程序详细信息”面板并禁用“自我修复” 。

  4. 导航到 rancher-monitoring 应用程序。

  5. 打开“应用程序详细信息”面板 > “清单”选项卡。

  6. 单击“编辑”,导航到“值” > “Prometheus” > “Prometheus 规范”部分。

  7. 添加所需的 remoteWrite 配置。

  8. “保存”新配置。在应用新配置之前,rancher-monitoring 应用程序将显示“无法同步”。

    备注:

    Prometheus无需重新启动即可应用新的远程写入配置。

  9. 测试所需的远程写入集成。返回到步骤 8 以添加新配置。

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新