automation-suite
2022.10
false
Automation Suite 安装指南
- 概述
- 要求
- 安装
- 安装后
- 集群管理
- 监控和警示
- 迁移和升级
- 特定于产品的配置
- 最佳实践和维护
- 故障排除
- 无法获取沙盒映像
- Pod 未显示在 ArgoCD 用户界面中
- Redis 探测器失败
- RKE2 服务器无法启动
- 在 UiPath 命名空间中找不到密码
- ArgoCD 在首次安装后进入“进行中”状态
- 意外不一致;手动运行 fsck
- MongoDB Pod 处于 CrashLoopBackOff 状态或在删除后处于“等待 PVC 配置”状态
- MongoDB Pod 从 4.4.4-ent 升级到 5.0.7-ent 失败
- 集群还原或回滚后服务运行状况不佳
- Pod 在 Init:0/X 中卡住
- Prometheus 处于 CrashLoopBackoff 状态,并出现内存不足 (OOM) 错误
- 监控仪表板中缺少 Ceph-rook 指标
- Pod 无法在代理环境中与 FQDN 通信
- 使用 Automation Suite 诊断工具
- 使用 Automation Suite 支持捆绑包
- 探索日志
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
审核日志查询
先决条件
在 Automation Suite 设置中下载 Apps 的审核日志之前,必须满足以下要求:
- 您必须有权访问托管 UiPath™ 服务的计算机或虚拟机 (VM)。
(可选)您需要了解以下内容:
- 需要审核日志的组织名称 (
<orgName>)。 - 需要导出或删除审核日志的用户电子邮件地址 (
<userEmail>)。 - 从现在到您要获取或删除审核日志的日期 (
<numDays>) 之间的天数。
获取审核日志查询
db.getCollection("audit-logs").find({
__tenantId: '<orgName>',
'userInfo.userEmail': '<userEmail>',
timestamp: {
$lte: (new Date().getTime() - 86400000 * <numDays>)
}
});
db.getCollection("audit-logs").find({
__tenantId: '<orgName>',
'userInfo.userEmail': '<userEmail>',
timestamp: {
$lte: (new Date().getTime() - 86400000 * <numDays>)
}
});
例如,要获取用户电子邮件地址为 sampleOrg.admin@org.com,组织名称为 sampleOrg 的 180 days 以上的审核日志,请运行以下查询:
db.getCollection("audit-logs").find({
__tenantId: 'sampleOrg',
'userInfo.userEmail': 'sampleOrg.admin@org.com',
timestamp: {
$lt: (new Date().getTime() - 86400000 * 180)
}
});
db.getCollection("audit-logs").find({
__tenantId: 'sampleOrg',
'userInfo.userEmail': 'sampleOrg.admin@org.com',
timestamp: {
$lt: (new Date().getTime() - 86400000 * 180)
}
});
删除审核日志
db.getCollection("audit-logs").deleteMany({
__tenantId: '<orgName>',
'userInfo.userEmail': '<userEmail>',
timestamp: {
$lte: (new Date().getTime() - 86400000 * <numDays>)
}
});
db.getCollection("audit-logs").deleteMany({
__tenantId: '<orgName>',
'userInfo.userEmail': '<userEmail>',
timestamp: {
$lte: (new Date().getTime() - 86400000 * <numDays>)
}
});
例如,要删除用户电子邮件地址为 sampleOrg.admin@org.com,组织名称为 sampleOrg 的 180 days 以上的审核日志,请运行以下查询:
db.getCollection("audit-logs").deleteMany({
__tenantId: 'sampleOrg',
'userInfo.userEmail': 'sampleOrg.admin@org.com',
timestamp: {
$lt: (new Date().getTime() - 86400000 * 180)
}
});
db.getCollection("audit-logs").deleteMany({
__tenantId: 'sampleOrg',
'userInfo.userEmail': 'sampleOrg.admin@org.com',
timestamp: {
$lt: (new Date().getTime() - 86400000 * 180)
}
});
程序
-
打开命令提示符或 Powershell。
-
使用以下命令通过 SSH 连接到虚拟机。
ssh <user>@<host> user@host's password: <password>ssh <user>@<host> user@host's password: <password> -
使用以下命令转到根用户。
sudo susudo su -
使用以下命令转到根文件夹。
cd /cd / -
使用以下命令导出 KUBECONFIG。
export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/binexport KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/var/lib/rancher/rke2/bin -
使用以下命令获取 MongoDB URI。
kubectl -n mongodb get secrets/mongo-admin-user --template={{.data.MONGODB_URI}} | base64 -d // copy and store the output till '/admin' (as highlighted in screenshot) for further use in next commandskubectl -n mongodb get secrets/mongo-admin-user --template={{.data.MONGODB_URI}} | base64 -d // copy and store the output till '/admin' (as highlighted in screenshot) for further use in next commands -
使用以下命令转到 Mongo 副本集的 Shell。
kubectl -n mongodb exec -it mongodb-replica-set-0 bashkubectl -n mongodb exec -it mongodb-replica-set-0 bash -
使用以下命令检索审核记录。
mongo '<mongodb-uri>' --tls --tlsCAFile /var/lib/tls/ca/ca.crt --quiet << EOF > /data/audit-fetch-query.json use appstudio db.getCollection("audit-logs").find({"__tenantId": "<orgName>", "userInfo.userEmail": "<userEmail>", "timestamp": {\$lte: (new Date().getTime() - 86400000 * <numDays>)}}).toArray() EOFmongo '<mongodb-uri>' --tls --tlsCAFile /var/lib/tls/ca/ca.crt --quiet << EOF > /data/audit-fetch-query.json use appstudio db.getCollection("audit-logs").find({"__tenantId": "<orgName>", "userInfo.userEmail": "<userEmail>", "timestamp": {\$lte: (new Date().getTime() - 86400000 * <numDays>)}}).toArray() EOF -
使用以下命令删除审核记录。
mongo '<mongodb-uri>' --tls --tlsCAFile /var/lib/tls/ca/ca.crt --quiet << EOF > /data/audit-delete-query.json use appstudio db.getCollection("audit-logs").deleteMany({"__tenantId": "<orgName>", "userInfo.userEmail": "<userEmail>", "timestamp": {\$lte: (new Date().getTime() - 86400000 * <numDays>)}}) EOFmongo '<mongodb-uri>' --tls --tlsCAFile /var/lib/tls/ca/ca.crt --quiet << EOF > /data/audit-delete-query.json use appstudio db.getCollection("audit-logs").deleteMany({"__tenantId": "<orgName>", "userInfo.userEmail": "<userEmail>", "timestamp": {\$lte: (new Date().getTime() - 86400000 * <numDays>)}}) EOF -
使用以下命令退出 Pod Shell。
exitexit -
使用以下命令将 Pod 中的文件移至虚拟机。
kubectl -n mongodb exec -i mongodb-replica-set-0 -- sh -c 'cat /data/audit-fetch-query.json' > audit-fetch-query.json kubectl -n mongodb exec -i mongodb-replica-set-0 -- sh -c 'cat /data/audit-delete-query.json' > audit-delete-query.jsonkubectl -n mongodb exec -i mongodb-replica-set-0 -- sh -c 'cat /data/audit-fetch-query.json' > audit-fetch-query.json kubectl -n mongodb exec -i mongodb-replica-set-0 -- sh -c 'cat /data/audit-delete-query.json' > audit-delete-query.json -
使用以下命令退出虚拟机。
// exit the root user exit // exit the vm exit// exit the root user exit // exit the vm exit -
使用以下命令将虚拟机中的文件移至个人计算机。
备注:SCP might not run on some PowerShells and may need to be installed.
scp <user>@<host>:/audit-fetch-query.json . user@host's password: <password> scp <user>@<host>:/audit-delete-query.json . user@host's password: <password>scp <user>@<host>:/audit-fetch-query.json . user@host's password: <password> scp <user>@<host>:/audit-delete-query.json . user@host's password: <password>