- 概述
- 要求
- 安装
- 安装后
- 集群管理
- 监控和警示
- 迁移和升级
- 特定于产品的配置
- 最佳实践和维护
- 故障排除
- 无法获取沙盒映像
- Pod 未显示在 ArgoCD 用户界面中
- Redis 探测器失败
- RKE2 服务器无法启动
- 在 UiPath 命名空间中找不到密码
- 初始安装后,ArgoCD 应用程序进入“进行中”状态
- MongoDB Pod 处于 CrashLoopBackOff 状态或在删除后处于“等待 PVC 配置”状态
- 意外错误:不一致;手动运行 fsck
- 集群还原后 MongoDB 或业务应用程序降级
- 缺少 Self-heal-operator 和 Sf-k8-utils 存储库
- 集群还原或回滚后服务不正常
- RabbitMQ Pod 卡在 CrashLoopBackOff 中
- Prometheus 处于 CrashLoopBackoff 状态,并出现内存不足 (OOM) 错误
- 监控仪表板中缺少 Ceph-rook 指标
- Pod 无法在代理环境中与 FQDN 通信
- 使用 Automation Suite 诊断工具
- 使用 Automation Suite 支持捆绑包
- 探索日志
执行数据库维护
保持数据库整洁有序,这一点很重要。 为此,我们建议执行以下操作:
使用 SQL Server 维护解决方案
SQL Server 维护解决方案是一组脚本,让您可以从 2005 版本开始在所有版本的 Microsoft SQL Server 上运行备份、完整性检查以及索引和统计信息维护。有关详细信息,请参阅此 GitHub 项目。
备份数据库
我们建议对 SQL Server 数据库实施定期备份,例如每周完整备份或每日增量备份。
此外,我们建议您使用在该位置使用脚本创建的 DatabaseBackup 存储程序。
定期删除旧数据
共享的 Suite 功能
在删除项目之前,创建一个单独的数据库来保存项目。此数据库充当因某些原因(例如审核)可能需要存储的项目的存档。
-
创建一个新的调用数据库,例如
UiPathArchives:create database UiPathArchivescreate database UiPathArchives -
创建以下备份表:
-
ArchiveAuditEvent,其结构与AuditEvent表相同:SELECT * INTO [UiPathArchives].[dbo].[ArchiveAuditEvent] from [AutomationSuite_Platform].[adt].[AuditEvent] where 1 = 2SELECT * INTO [UiPathArchives].[dbo].[ArchiveAuditEvent] from [AutomationSuite_Platform].[adt].[AuditEvent] where 1 = 2
-
-
存档数据:
-
存档审核记录
DECLARE @NumberOfDaysToKeep INT DECLARE @CurrentDate DATETIME -- Specify the number of days SET @NumberOfDaysToKeep = 60 -- Archive the list of audit event records that you want to delete SET @CurrentDate = GetDate() BEGIN TRANSACTION INSERT INTO [UiPathArchives].[dbo].[ArchiveAuditEvent] SELECT [Id],[CreatedOn],[Version],[OrganizationId],[Source],[Category],[Action],[IsUserEvent], [UserId],[FullName],[Email],[DetailsVersion],[Details],[OperationId] FROM [adt].[AuditEvent] WHERE DateDiff(day, CreatedOn, @CurrentDate) > @NumberOfDaysToKeep -- Delete the audit events DELETE FROM [adt].[AuditEvent] WHERE EXISTS (SELECT 1 FROM [UiPathArchives].[dbo].[ArchiveAuditEvent] WHERE Id = [adt].[AuditEvent].[Id]) COMMIT TRANSACTIONDECLARE @NumberOfDaysToKeep INT DECLARE @CurrentDate DATETIME -- Specify the number of days SET @NumberOfDaysToKeep = 60 -- Archive the list of audit event records that you want to delete SET @CurrentDate = GetDate() BEGIN TRANSACTION INSERT INTO [UiPathArchives].[dbo].[ArchiveAuditEvent] SELECT [Id],[CreatedOn],[Version],[OrganizationId],[Source],[Category],[Action],[IsUserEvent], [UserId],[FullName],[Email],[DetailsVersion],[Details],[OperationId] FROM [adt].[AuditEvent] WHERE DateDiff(day, CreatedOn, @CurrentDate) > @NumberOfDaysToKeep -- Delete the audit events DELETE FROM [adt].[AuditEvent] WHERE EXISTS (SELECT 1 FROM [UiPathArchives].[dbo].[ArchiveAuditEvent] WHERE Id = [adt].[AuditEvent].[Id]) COMMIT TRANSACTION使用以下查询时,在删除旧数据之前,会将旧数据先复制到这些档案中。
-
-
删除表格中的数据。
重要提示:在运行以下脚本之前,请确保使它们适应您的环境。
-
审核事件
declare @NumberOfDaysToKeep int declare @CurrentDate datetime -- Specify the number of days SET @NumberOfDaysToKeep = 60 -- Create temporary table with the list of audit event records that you want to delete SET @CurrentDate = GetDate() SELECT [Id],[CreatedOn],[Version],[OrganizationId],[Source],[Category],[Action],[IsUserEvent], [UserId],[FullName],[Email],[DetailsVersion],[Details],[OperationId] INTO #TempAuditRecordsToDelete FROM [adt].[AuditEvent] WHERE DateDiff(day, CreatedOn, @CurrentDate) > @NumberOfDaysToKeep -- Review the audit event records to be deleted SELECT * FROM #TempAuditRecordsToDelete -- Delete the audit events BEGIN TRANSACTION DELETE FROM [adt].[AuditEvent] WHERE EXISTS (SELECT 1 FROM #TempAuditRecordsToDelete WHERE Id = [adt].[AuditEvent].[Id]) DROP TABLE #TempAuditRecordsToDelete COMMIT TRANSACTIONdeclare @NumberOfDaysToKeep int declare @CurrentDate datetime -- Specify the number of days SET @NumberOfDaysToKeep = 60 -- Create temporary table with the list of audit event records that you want to delete SET @CurrentDate = GetDate() SELECT [Id],[CreatedOn],[Version],[OrganizationId],[Source],[Category],[Action],[IsUserEvent], [UserId],[FullName],[Email],[DetailsVersion],[Details],[OperationId] INTO #TempAuditRecordsToDelete FROM [adt].[AuditEvent] WHERE DateDiff(day, CreatedOn, @CurrentDate) > @NumberOfDaysToKeep -- Review the audit event records to be deleted SELECT * FROM #TempAuditRecordsToDelete -- Delete the audit events BEGIN TRANSACTION DELETE FROM [adt].[AuditEvent] WHERE EXISTS (SELECT 1 FROM #TempAuditRecordsToDelete WHERE Id = [adt].[AuditEvent].[Id]) DROP TABLE #TempAuditRecordsToDelete COMMIT TRANSACTION
-
身份服务器
在删除项目之前,创建一个单独的数据库来保存项目。此数据库充当因某些原因(例如审核)可能需要存储的项目的存档。
仅在使用 SQL Server 内部部署 SQL 时才支持本节中提供的数据库维护脚本。它不适用于 Azure SQL。如果您的 Automation Suite 部署使用 Azure SQL,请不要运行此脚本。
-
创建一个新的调用数据库,例如
UiPathIdentityArchives:create database UiPathIdentityArchivescreate database UiPathIdentityArchives -
创建以下备份表:
-
ArchiveLoginAttempts,其结构与UserLoginAttempts表相同:select * into [UiPathIdentityArchives].[dbo].[ArchiveUserLoginAttempts] from [AutomationSuite_Platform].[identity].[UserLoginAttempts] where 1=2select * into [UiPathIdentityArchives].[dbo].[ArchiveUserLoginAttempts] from [AutomationSuite_Platform].[identity].[UserLoginAttempts] where 1=2使用以下查询时,在删除旧数据之前,会将旧数据先复制到这些档案中。
-
-
删除表格中的数据。
重要提示:在运行以下脚本之前,请确保使它们适应您的环境。
-
用户登录尝试次数
例如,要删除超过 60 天的登录尝试,请使用以下查询。它可以手动执行,也可以在 SQL Server 作业中计划。
declare @NumberOfDaysToKeep int set @NumberOfDaysToKeep = 60 if OBJECT_ID('[UiPathIdentityArchives].[dbo].[UserLoginAttemps]') = NULL begin select * into [UiPathIdentityArchives].[dbo].[UserLoginAttemps] from [identity].UserLoginAttempts where 1=2 end begin transaction set identity_insert [UiPathIdentityArchives].[dbo].[UserLoginAttemps] on insert into [UiPathIdentityArchives].[dbo].[UserLoginAttemps] ([Id],[PartitionId],[UserId],[UserNameOrEmailAddress],[ClientIpAddress],[ClientName],[BrowserInfo],[Result],[CreationTime],[AuthenticationProvider],[PartitionName]) select [Id],[PartitionId],[UserId],[UserNameOrEmailAddress],[ClientIpAddress],[ClientName],[BrowserInfo],[Result],[CreationTime],[AuthenticationProvider],[PartitionName] from [identity].UserLoginAttempts where DateDiff(day, CreationTime, GetDate()) > @NumberOfDaysToKeep delete from [identity].UserLoginAttempts where DateDiff(day, CreationTime, GetDate()) > @NumberOfDaysToKeep commit transactiondeclare @NumberOfDaysToKeep int set @NumberOfDaysToKeep = 60 if OBJECT_ID('[UiPathIdentityArchives].[dbo].[UserLoginAttemps]') = NULL begin select * into [UiPathIdentityArchives].[dbo].[UserLoginAttemps] from [identity].UserLoginAttempts where 1=2 end begin transaction set identity_insert [UiPathIdentityArchives].[dbo].[UserLoginAttemps] on insert into [UiPathIdentityArchives].[dbo].[UserLoginAttemps] ([Id],[PartitionId],[UserId],[UserNameOrEmailAddress],[ClientIpAddress],[ClientName],[BrowserInfo],[Result],[CreationTime],[AuthenticationProvider],[PartitionName]) select [Id],[PartitionId],[UserId],[UserNameOrEmailAddress],[ClientIpAddress],[ClientName],[BrowserInfo],[Result],[CreationTime],[AuthenticationProvider],[PartitionName] from [identity].UserLoginAttempts where DateDiff(day, CreationTime, GetDate()) > @NumberOfDaysToKeep delete from [identity].UserLoginAttempts where DateDiff(day, CreationTime, GetDate()) > @NumberOfDaysToKeep commit transaction
-
Orchestrator
For details on how to periodically delete old data from the Orchestrator database, see Cleaning up the Orchestrator database.
Task Mining
For details on how to periodically delete old data from the Task Mining database, see Cleaning up the Task Mining database.