automation-cloud
latest
false
- 入门指南
- 数据安全性与合规性
- 组织
- 身份验证和安全性
- 许可
- 租户和服务
- 帐户和角色
- 在您的组织中进行测试
- Ai Trust Layer
- 外部应用程序
- 通知
- 日志记录
- 关于日志
- 导出日志
- 故障排除
- 迁移到 Automation Cloud
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。

Automation Cloud 管理员指南
上次更新日期 2025年12月18日
仅当您订阅企业版许可计划时,才可以使用此功能。
通过统一日志记录体验,您可以使用以下方法之一从Automation Cloud TM以 CSV 格式导出日志:
- 用户界面中的“导出”选项:在组织或租户的“审核日志”部分中,选择“导出” 。
- 审核日志 API :使用审核日志 API。
- UiPath 自定义脚本:运行 UiPath 开发的脚本以从 UiPath 的长期审核日志存储中导出日志。
出于长期保留或合规性目的,统一日志记录体验和传统日志记录体验都允许您配置机器人日志导出,以自动将数据从 Orchestrator 发送到 Azure Blob 存储、AWS S3 或 Google Cloud Storage,这些文件每小时生成一次,并且可以通过使用您自己的 BI 或监控解决方案进行处理。
如果您使用的是统一日志记录体验,则可以使用专用脚本来导出无法再通过“审核日志”界面使用的审核日志。该脚本支持检索 2 年前的日志。
在以下情况下,此脚本很有用:
-
出于合规性或调查目的,您需要访问较旧的审核日志。
-
您想要自动执行长期日志存档。
先决条件
- 将以下脚本复制到您自己的
.sh文件中:appId=$1 appSecret=$2 organizatioNameOrId=$3 fromDate=$4 toDate=$5 mode=${6:-s} cloud=${7:-cloud} if [[ $# -lt 5 ]]; then echo "Error: Not all required input parameters provided." echo "Usage: $0 <appId> <appSecret> <organizatioNameOrId> <fromDate> <toDate> <mode>(optional: v for verbose, s for silent)" exit 1 fi # Validate "fromDate" date format (MM/DD/YYYY) if ! date -d "$fromDate" &>/dev/null; then echo "Error: Invalid date format for 'fromDate'. Please use MM/DD/YYYY format." exit 1 fi # Validate "to" date format (MM/DD/YYYY) if ! date -d "$toDate" &>/dev/null; then echo "Error: Invalid date format for 'toDate'. Please use MM/DD/YYYY format." exit 1 fi echo $(date +"%Y-%m-%d %H:%M:%S.%3N") "Start Getting UiPath Token." response=$(curl --data-urlencode -X POST "https://${cloud}.uipath.com/${organizationNameOrId}/identity_/connect/token" -$mode \ -d "grant_type=client_credentials" \ -d "scope=PM.Audit.Read" \ -d "client_id=$appId" \ -d "client_secret=$appSecret" \ -H "Content-Type: application/x-www-form-urlencoded") access_token=$(echo "$response" | jq -r '.access_token') if [[ "$access_token" == null ]]; then echo "Error: Access token is null or empty in the response. Please verify the appId and appSecret." exit 1 fi base_dir=$(date +"%Y-%m-%d%H:%M:%S.%3N") echo $base_dir "Start Downloading UiPath Platform Audit logs." # Define the base URL base_url="https://${cloud}.uipath.com/${organizatioNameOrId}/orgaudit_/api/query/downloadeventsfromlongtermstore" mkdir -p $base_dir # Iterate through time intervals current_date=$(date -u -d "$fromDate" +"%Y-%m-%dT%H:%M:%SZ") seconds_in_a_day=$((24*60*60)) while [ "$(date -d "$current_date" +%s)" -le "$(date -d "$toDate" +%s)" ]; do next_date=$(date -u -d "$current_date + $(($seconds_in_a_day-1)) seconds" +"%Y-%m-%dT%H:%M:%SZ") # Construct the full URL with the current time interval formatted_current_date=$(date -u -d "$current_date" +"%Y-%m-%dT%H:%M:%SZ" | sed 's/\//%2F/g') formatted_current_date="${current_date}" formatted_next_date=$next_date | sed 's/\//%2F/g' formatted_next_date="${next_date}" full_url="$base_url?from=$formatted_current_date&to=$formatted_next_date" echo $full_url echo "Downloading UiPath Audit Log from $current_date to $next_date" curl -X GET "$full_url" -$mode \ -H "Authorization: Bearer $access_token" \ -o "${base_dir}/${current_date////-}_to_${next_date////-}.zip" # Save the response to a file # Move to the next time interval current_date=$next_date one=1 current_date=$(date -u -d "$current_date + $one seconds" +"%Y-%m-%dT%H:%M:%SZ") done for zip_file in "$base_dir"/*.zip; do zip_file_name="$(basename "$zip_file")" unzip -q "$zip_file" -d "$base_dir/auditlogs/" echo "Extracted ${zip_file_name%.*}" rm "$zip_file" done shopt -s nullglob for zip_file in "$base_dir/auditlogs"/*.zip; do zip_file_name="$(basename "$zip_file")" unzip -q "$zip_file" -d "$base_dir/auditlogs/${zip_file_name%.*}" for data_file in "$base_dir/auditlogs"/${zip_file_name%.*}/*.txt; do data_file_name="$(basename "$data_file")" mv "$data_file" "$base_dir/auditlogs/${data_file_name%.*}_${zip_file_name%.*}.txt" rm -r "$base_dir/auditlogs/${zip_file_name%.*}" done rm "$zip_file" done shopt -u nullglob echo $(date +"%Y-%m-%d %H:%M:%S.%3N") "Downloaded UiPath Platform Audit logs and saved them according to UTC date"appId=$1 appSecret=$2 organizatioNameOrId=$3 fromDate=$4 toDate=$5 mode=${6:-s} cloud=${7:-cloud} if [[ $# -lt 5 ]]; then echo "Error: Not all required input parameters provided." echo "Usage: $0 <appId> <appSecret> <organizatioNameOrId> <fromDate> <toDate> <mode>(optional: v for verbose, s for silent)" exit 1 fi # Validate "fromDate" date format (MM/DD/YYYY) if ! date -d "$fromDate" &>/dev/null; then echo "Error: Invalid date format for 'fromDate'. Please use MM/DD/YYYY format." exit 1 fi # Validate "to" date format (MM/DD/YYYY) if ! date -d "$toDate" &>/dev/null; then echo "Error: Invalid date format for 'toDate'. Please use MM/DD/YYYY format." exit 1 fi echo $(date +"%Y-%m-%d %H:%M:%S.%3N") "Start Getting UiPath Token." response=$(curl --data-urlencode -X POST "https://${cloud}.uipath.com/${organizationNameOrId}/identity_/connect/token" -$mode \ -d "grant_type=client_credentials" \ -d "scope=PM.Audit.Read" \ -d "client_id=$appId" \ -d "client_secret=$appSecret" \ -H "Content-Type: application/x-www-form-urlencoded") access_token=$(echo "$response" | jq -r '.access_token') if [[ "$access_token" == null ]]; then echo "Error: Access token is null or empty in the response. Please verify the appId and appSecret." exit 1 fi base_dir=$(date +"%Y-%m-%d%H:%M:%S.%3N") echo $base_dir "Start Downloading UiPath Platform Audit logs." # Define the base URL base_url="https://${cloud}.uipath.com/${organizatioNameOrId}/orgaudit_/api/query/downloadeventsfromlongtermstore" mkdir -p $base_dir # Iterate through time intervals current_date=$(date -u -d "$fromDate" +"%Y-%m-%dT%H:%M:%SZ") seconds_in_a_day=$((24*60*60)) while [ "$(date -d "$current_date" +%s)" -le "$(date -d "$toDate" +%s)" ]; do next_date=$(date -u -d "$current_date + $(($seconds_in_a_day-1)) seconds" +"%Y-%m-%dT%H:%M:%SZ") # Construct the full URL with the current time interval formatted_current_date=$(date -u -d "$current_date" +"%Y-%m-%dT%H:%M:%SZ" | sed 's/\//%2F/g') formatted_current_date="${current_date}" formatted_next_date=$next_date | sed 's/\//%2F/g' formatted_next_date="${next_date}" full_url="$base_url?from=$formatted_current_date&to=$formatted_next_date" echo $full_url echo "Downloading UiPath Audit Log from $current_date to $next_date" curl -X GET "$full_url" -$mode \ -H "Authorization: Bearer $access_token" \ -o "${base_dir}/${current_date////-}_to_${next_date////-}.zip" # Save the response to a file # Move to the next time interval current_date=$next_date one=1 current_date=$(date -u -d "$current_date + $one seconds" +"%Y-%m-%dT%H:%M:%SZ") done for zip_file in "$base_dir"/*.zip; do zip_file_name="$(basename "$zip_file")" unzip -q "$zip_file" -d "$base_dir/auditlogs/" echo "Extracted ${zip_file_name%.*}" rm "$zip_file" done shopt -s nullglob for zip_file in "$base_dir/auditlogs"/*.zip; do zip_file_name="$(basename "$zip_file")" unzip -q "$zip_file" -d "$base_dir/auditlogs/${zip_file_name%.*}" for data_file in "$base_dir/auditlogs"/${zip_file_name%.*}/*.txt; do data_file_name="$(basename "$data_file")" mv "$data_file" "$base_dir/auditlogs/${data_file_name%.*}_${zip_file_name%.*}.txt" rm -r "$base_dir/auditlogs/${zip_file_name%.*}" done rm "$zip_file" done shopt -u nullglob echo $(date +"%Y-%m-%d %H:%M:%S.%3N") "Downloaded UiPath Platform Audit logs and saved them according to UTC date" - 在 WSL(适用于 Linux 的 Windows 子系统)环境中运行脚本并确保已安装以下工具:
sudo apt install dos2unix unzip jqsudo apt install dos2unix unzip jq - 使用以下命令准备要执行的脚本:
dos2unix <script-name>.sh chmod +x <script-name>.shdos2unix <script-name>.sh chmod +x <script-name>.sh -
在租户中创建机密外部应用程序并分配以下 API 作用域:
PM.Audit.Read(应用程序)。 -
收集以下应用程序凭据:
-
应用程序 ID (
client_id) -
应用程序密码 (
client_secret)
-
步骤
- 在终端中设置所需的变量:
client_id='<your-client-id>' client_secret='<your-client-secret>' org_name='<your-org-name>' start_date='MM/DD/YYYY' end_date='MM/DD/YYYY'client_id='<your-client-id>' client_secret='<your-client-secret>' org_name='<your-org-name>' start_date='MM/DD/YYYY' end_date='MM/DD/YYYY' - 使用以下命令运行脚本:
./<script-name>.sh $client_id $client_secret $org_name $start_date $end_date。例如:
client_id='<clientId>' client_secret='<clientsecret>' org_name='test_org' start_date='09/01/2025' end_date='10/01/2025' ./<script-name>.sh $client_id $client_secret $org_name $start_date $end_date vclient_id='<clientId>' client_secret='<clientsecret>' org_name='test_org' start_date='09/01/2025' end_date='10/01/2025' ./<script-name>.sh $client_id $client_secret $org_name $start_date $end_date v
要将在 Orchestrator 服务中生成的 Robot 日志导出到 Azure、AWS S3 和 Google Cloud Storage,请遵循进一步描述的特定程序。 日志保存在
uipathrobotlogs容器中的.csv文件中。 导出是按租户进行的,这有助于实现以下目的:
- 存储必须保留的日志,以用于合规性和审计目的。
-
在您自己的报告或 BI 工具中分析和可视化日志输出。
注意:配置日志导出页面时,我们不支持回填 30 天的日志。
Azure
AWS S3
提示:您可以将静态 IP 配置到允许列表,而不对所有外部 IP 开放网络。使用 AWS S3 中的访问策略添加“拒绝”所有请求,除非来自
aws:SourceIp列表的请求,如 AWS S3 用户指南中的Amazon S3 的存储桶策略页面中所述。查看 Automation Cloud 管理员指南中的“配置防火墙”页面,获取完整的 IP 列表。