UiPath Documentation
uipath-cli
latest
false
UiPath CLI 用户指南
重要 :
请注意,此内容已使用机器翻译进行了本地化。 新发布内容的本地化可能需要 1-2 周的时间才能完成。

UIP Insights 作业

“uip Insights 作业”的语法和选项,它将预设的 Insights 仪表板公开为可按时间范围和文件夹进行筛选的命令。

uip insights jobs将预设的 Insights 仪表板公开为 CLI 命令。每个子命令都会发布到专用的 Insights 端点,并在标准Code / Data信封中返回原始响应。所有七个子命令共享相同的筛选器界面(时间范围、文件夹、流程、计算机)。

大纲​

uip insights jobs <verb> [options]
uip insights jobs <verb> [options]

动词​

动词用途
summary作业总计数、成功计数、平均处理时间。
completed-timeline一段时间内已完成的作业,按最终状态分组。
uncompleted-timeline一段时间内未完成(正在运行/待处理)的作业。
top-failures作业失败次数最多的流程。
failures-by-reason失败的作业按异常原因分组。
process-details每个流程的作业细分(按状态划分的计数)。
failure-details用于向下钻取调查的详细故障行。

共享筛选条件​

每个insights jobs子命令接受相同的选项:

标记描述
--time-range <minutes>相对时间范围 (以分钟为单位)(例如1440 1 天, 43200 30 天)。
--started-after <epoch-ms>以 Unix 历元毫秒为单位的绝对开始时间。
--started-before <epoch-ms>以 Unix 历元毫秒为单位的绝对结束时间。
--folder-key <guid>文件夹密钥筛选器(可重复)。
--process-name <name>流程名称筛选器(可重复)。
--machine-name <name>计算机名称筛选器(可重复)。
--timezone-offset <minutes>客户端时区相对于 UTC 的偏移量(分钟)。

时间范围为必填项:发送--time-range ,或同时发送--started-after和--started-before 。仅提供 --started-after/--started-before 其中一个与两者都不提供效果相同 — 命令将失败并显示 A time range is required.,并退出 1。将 --time-range 与绝对对结合使用是有效的,但 Insights 后端会解析为较小的间隔。其他所有筛选器(--folder-key、--process-name、--machine-name、--timezone-offset)为可选; --folder-key、--process-name 和 --machine-name 可重复 — 多次传递以包含多个值。

整数选项( --time-range 、 --started-after 、 --started-before 、 --timezone-offset )在解析时进行验证;非数字值快速失败,并显示命名标志的消息。

UIP Insights 作业摘要​

作业总计数、成功计数和平均处理时间。

选项​

请参阅共享筛选器。

示例​

uip insights jobs summary --time-range 1440

uip insights jobs summary \
    --process-name Invoicing --process-name Payroll --time-range 43200

uip insights jobs summary --time-range 1440 \
    --output-filter 'Data.{total:TotalJobs, success:SuccessfulJobs}'
uip insights jobs summary --time-range 1440

uip insights jobs summary \
    --process-name Invoicing --process-name Payroll --time-range 43200

uip insights jobs summary --time-range 1440 \
    --output-filter 'Data.{total:TotalJobs, success:SuccessfulJobs}'

响应代码: InsightsJobsSummary 。

uip Insights 作业完成时间线​

一段时间内已完成的作业,按最终作业状态分组。

选项​

请参阅共享筛选器。

示例​

uip insights jobs completed-timeline --time-range 10080

uip insights jobs completed-timeline \
    --folder-key f0f0f0f0-0000-0000-0000-000000000001 \
    --time-range 1440 --timezone-offset -480

uip insights jobs completed-timeline \
    --started-after 1714003200000 --started-before 1714608000000
uip insights jobs completed-timeline --time-range 10080

uip insights jobs completed-timeline \
    --folder-key f0f0f0f0-0000-0000-0000-000000000001 \
    --time-range 1440 --timezone-offset -480

uip insights jobs completed-timeline \
    --started-after 1714003200000 --started-before 1714608000000

响应代码: InsightsJobsCompletedTimeline 。

uip Insights 作业未完成时间线​

一段时间内未完成(正在运行/待处理)的作业。

选项​

请参阅共享筛选器。

示例​

uip insights jobs uncompleted-timeline --time-range 1440

uip insights jobs uncompleted-timeline \
    --folder-key f0f0f0f0-0000-0000-0000-000000000001 \
    --folder-key f0f0f0f0-0000-0000-0000-000000000002

uip insights jobs uncompleted-timeline --time-range 1440 \
    --machine-name prod-worker-01
uip insights jobs uncompleted-timeline --time-range 1440

uip insights jobs uncompleted-timeline \
    --folder-key f0f0f0f0-0000-0000-0000-000000000001 \
    --folder-key f0f0f0f0-0000-0000-0000-000000000002

uip insights jobs uncompleted-timeline --time-range 1440 \
    --machine-name prod-worker-01

响应代码: InsightsJobsUncompletedTimeline 。

uip Insights 作业中失败率最高的作业​

筛选窗口中失败次数最多的流程。

选项​

请参阅共享筛选器。

示例​

uip insights jobs top-failures --time-range 43200

uip insights jobs top-failures --time-range 10080 \
    --folder-key f0f0f0f0-0000-0000-0000-000000000001

uip insights jobs top-failures --time-range 43200 \
    --output-filter 'Data[].{process:ProcessName, count:FailureCount}'
uip insights jobs top-failures --time-range 43200

uip insights jobs top-failures --time-range 10080 \
    --folder-key f0f0f0f0-0000-0000-0000-000000000001

uip insights jobs top-failures --time-range 43200 \
    --output-filter 'Data[].{process:ProcessName, count:FailureCount}'

响应代码: InsightsJobsTopFailures 。

uip Insights 作业失败原因(按原因)​

失败的作业按异常原因分组。

选项​

请参阅共享筛选器。

示例​

uip insights jobs failures-by-reason --time-range 43200

uip insights jobs failures-by-reason --time-range 1440 \
    --process-name Invoicing

uip insights jobs failures-by-reason --time-range 10080 \
    --output-filter 'Data[].{reason:Reason, count:Count}'
uip insights jobs failures-by-reason --time-range 43200

uip insights jobs failures-by-reason --time-range 1440 \
    --process-name Invoicing

uip insights jobs failures-by-reason --time-range 10080 \
    --output-filter 'Data[].{reason:Reason, count:Count}'

响应代码: InsightsJobsFailuresByReason 。

uip Insights 作业流程详细信息​

每个流程的作业细分(按状态划分的计数)。

选项​

请参阅共享筛选器。

示例​

uip insights jobs process-details --process-name Invoicing --time-range 1440

uip insights jobs process-details --time-range 43200 \
    --folder-key f0f0f0f0-0000-0000-0000-000000000001

uip insights jobs process-details \
    --process-name Invoicing --process-name Payroll \
    --started-after 1714003200000 --started-before 1714608000000
uip insights jobs process-details --process-name Invoicing --time-range 1440

uip insights jobs process-details --time-range 43200 \
    --folder-key f0f0f0f0-0000-0000-0000-000000000001

uip insights jobs process-details \
    --process-name Invoicing --process-name Payroll \
    --started-after 1714003200000 --started-before 1714608000000

响应代码: InsightsJobsProcessDetails 。

uip Insights 作业失败详细信息​

用于向下钻取调查的详细故障行。

选项​

请参阅共享筛选器。

示例​

uip insights jobs failure-details --process-name Invoicing --time-range 1440

uip insights jobs failure-details --time-range 10080 \
    --machine-name prod-worker-01

uip insights jobs failure-details --time-range 1440 \
    --output-filter 'Data[].{job:JobKey, reason:Reason, ts:StartTime}'
uip insights jobs failure-details --process-name Invoicing --time-range 1440

uip insights jobs failure-details --time-range 10080 \
    --machine-name prod-worker-01

uip insights jobs failure-details --time-range 1440 \
    --output-filter 'Data[].{job:JobKey, reason:Reason, ts:StartTime}'

响应代码: InsightsJobsFailureDetails 。

数据形状(--输出 json)​

所有命令都返回相同的信封。Data字段包含特定于端点的 Insights 响应,内部结构因端点而异,但信封是统一的。

{
  "Code": "InsightsJobsSummary",
  "Data": { "...": "endpoint-specific payload" }
}
{
  "Code": "InsightsJobsSummary",
  "Data": { "...": "endpoint-specific payload" }
}
备注:

每个响应变体的确切内部结构由 Insights API 指定,此处不再枚举。使用--output json对包含数据的租户运行一次命令,以查看您将使用的架构,并在解析特定字段时在 CI 中固定@uipath/cli 。

错误行为​

  • 缺少身份验证。CLI 会发出带有Failure的Instructions: "Run 'uip login' to authenticate first." ,然后退出1 。
  • 后端错误(Insights 中的 4xx/5xx)。Failure为Instructions: "Check your authentication, tenant, and filter parameters." ,并退出1 。
  • uip insights — 工具概述。
  • uip login — 用于每次 Insights 调用的会话。
  • uip traces — LLM 可观察性跨度,是一个垂直的可观察性面。

另请参阅​

此页面有帮助吗?

连接

需要帮助? 支持

想要了解详细内容? UiPath Academy

有问题? UiPath 论坛

保持更新