Automation Suite
2023.10
False
横幅背景图像
Linux 版 Automation Suite 安装指南
上次更新日期 2024年4月19日

警示

您必须配置警示接收人,以防止出现可能导致停机的问题。

配置警示

添加电子邮件收件人

要在安装后添加新的电子邮件配置,请运行以下命令:

./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

要将电子邮件通知发送给多个收件人,您可以创建多个电子邮件接收人。

备注:
您可以在 Automation Suite 安装文件夹 .../UiPathAutomationSuite/UiPath_Installer/bin 中找到 uipathctl

标记

示例

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]

添加 Webhook 以向外部工具发送警示

警示管理器配置以 Base64 编码格式存储在密码中。要更新密码,请执行以下步骤:

  1. 在名为 am_config.yaml 的文件中获取现有警示管理器配置。
    kubectl get secret alertmanager-config -n cattle-monitoring-system -o jsonpath="{.data.alertmanager\.yaml}" | base64 --decode > am_config.yamlkubectl get secret alertmanager-config -n cattle-monitoring-system -o jsonpath="{.data.alertmanager\.yaml}" | base64 --decode > am_config.yaml 
  2. 配置 Webhook。有关详细信息,请参阅警示管理器 Webhook 配置
  3. 将配置编码为 Base64 格式。
    openssl base64 -in am_config.yaml -out am_config_base64.yamlopenssl base64 -in am_config.yaml -out am_config_base64.yaml
  4. 更新密码中的 alertmanager.yaml 属性。将现有的 Base64 编码字符串替换为 am_config_base64.yaml 中的字符串。
  5. 检查警示管理器状态部分中的配置是否已更新。
有关故障排除,请参阅警示管理器和 Prometheus Pod 日志。

测试警示

要测试警示,请执行以下步骤:

  1. 通过访问 https://monitoring.fqdn/alertmanager 登录警示管理器。
  2. 复制 _oauth2_proxy=<value> Cookie。
  3. 通过 Postman 创建测试警示,如以下示例所示:
    Method: Post
    URL: https://monitoring.fqdn/alertmanager/api/v2/alerts
    Headers: 
    - Content-Type: application/json
    - Cookie: _oauth2_proxy=<value>
    Body: [{"labels":{"alertname":"Acme Alert", "severity":"warning"}}]Method: Post
    URL: https://monitoring.fqdn/alertmanager/api/v2/alerts
    Headers: 
    - Content-Type: application/json
    - Cookie: _oauth2_proxy=<value>
    Body: [{"labels":{"alertname":"Acme Alert", "severity":"warning"}}]
  4. 现在,您应该可以在警示管理器中看到警示。

检查当前触发的警示

要查看警示,请使用 https://monitoring.fqdn/metrics 导航到 Prometheus,然后选择“警示”选项卡。在这里,您可以看到 Automation Suite 中配置的所有警示。
  • 要查看活动警示,请使用“触发”复选框筛选警示状态。

  • 选中“显示注释”以显示与警示相对应的消息。

docs image

静默警示

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

  1. 使用 https://monitoring.fqdn/alertmanager 访问警示管理器。
  2. 找到相关警示,然后选择“静默”。
  3. 填写“创建者”和“注释”详细信息,然后选择“创建”。警示应该不会再显示在监控仪表板上,也应该不会报告给任何已配置的收件人。

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.