订阅

UiPath Orchestrator

UiPath Orchestrator 指南

Orchestrator 日志

Orchestrator 诊断日志

这些是 UiPath Orchestrator 生成的有关其行为的诊断日志。

启用 UiPath Orchestrator 诊断日志

成功安装 UiPath Orchestrator 后,将启用 UiPath Orchestrator 诊断日志。它们依赖于 NLog 基础架构,其配置可以在 UiPath.Orchestrator.dll.config 文件中的 <nlog> 标签下找到。

📘

注意

请注意,无论用户选择哪种语言,Orchestrator 的服务器异常以及“作业详细信息”窗口上的堆栈跟踪都以英语记录。

UiPath Orchestrator 诊断日志的目标

所有应用程序日志都以最低日志记录级别 Information 记录到事件查看器。这由 UiPath.Orchestrator.dll.config 文件中的以下行指定:
<target xsi:type="EventLog" name="eventLog" layout="${message}" source="Orchestrator" log="Application" />
<logger name="*" minlevel="Info" writeTo="eventLog" />

作业计划程序生成的日志具有单独的目标和记录器:
<target xsi:type="EventLog" name="eventLogQuartz" layout="[Quartz] ${message} ${onexception: ${exception:format=tostring}}" source="Orchestrator" log="Application" />
<logger name="Orchestrator.Quartz.*" minlevel="Info" writeTo="eventLogQuartz" />
示例:

  • Could not create Quartz Job

业务规则和其他验证规则生成的日志具有单独的目标和记录器:
<target xsi:type="EventLog" name="businessExceptionEventLog" layout="${message}${onexception:${exception:format=tostring:maxInnerExceptionLevel=5:innerFormat=tostring}}" source="Orchestrator.BusinessException" log="Application" />
<logger name="BusinessException.*" minlevel="Info" writeTo="businessExceptionEventLog" final="true" />
在以下情况下,这些类型的错误消息会记录在事件查看器中:

  • 验证问题,例如:
    • Invalid username/email address or password.
    • The machine name DOC is already taken
  • 业务冲突,例如:
    • License expired!
    • The floating robot's session is already active on machine ROQADOCS06!
    • The robots already have pending jobs for this Process.
  • 未找到异常,例如:
    • QueueName1 does not exist.

Orchestrator 执行日志

The Orchestrator Execution Logs are sent by the Robots connected to it and are displayed in the Logs section of the Jobs or Robots pages. The application receives the data from the Robots, adds its own parameters (TenantID, FolderID, and forwards the messages to different targets, as specified in the <nlog> section from the UiPath.Orchestrator.dll.config file.

Orchestrator 执行日志的目标

默认情况下,所有机器人日志都发送到默认 Orchestrator 数据库的“日志”表,UiPath Orchestrator 将其他信息存储在该数据库中,但 UiPath.Orchestrator.dll.config 文件也可以配置为将其发送到其他数据库。

“日志”页面显示默认数据库的“日志”表中的信息。因此,如果此部分不存在,或者日志保存到其他数据库中,则页面为空。所有参数都应符合表格架构,如下所示:

<target xsi:type="Database" name="database" connectionString="${ui-connection-strings:item=Default}" keepConnection="true">
 <commandText>
  insert into dbo.Logs (OrganizationUnitId, TenantId, TimeStamp, Level, WindowsIdentity, ProcessName, JobKey, Message, RawMessage)
  values (@organizationUnitId, @tenantId, @timeStamp, @level, @windowsIdentity, @processName, @jobId, @message, @rawMessage)
 </commandText>
  <parameter name="@organizationUnitId" layout="${event-properties:item=organizationUnitId}" />
  <parameter name="@tenantId" layout="${event-properties:item=tenantId}" />
  <parameter name="@timeStamp" layout="${date}" />
  <parameter name="@level" layout="${event-properties:item=levelOrdinal}" />
  <parameter name="@windowsIdentity" layout="${event-properties:item=windowsIdentity}" />
  <parameter name="@processName" layout="${event-properties:item=processName}" />
  <parameter name="@jobId" layout="${event-properties:item=jobId}" />
  <parameter name="@message" layout="${message}" />
  <parameter name="@rawMessage" layout="${event-properties:item=rawMessage}" />
</target>
 <logger name="Robot.*" writeTo="database" final="true" />

Other targets can be added to the logs by configuring the UiPath.Orchestrator.dll.config file. A list of available targets can be found here.

Elasticsearch Server

默认情况下,从安装脚本中配置 Elasticsearch 目标。每个租户的索引都不同,但这可以通过 <nlog> 部分中指定的目标进行配置

<target name="robotElasticBuffer" xsi:type="BufferingWrapper" flushTimeout="5000">
<target xsi:type="ElasticSearch" name="robotElastic" uri="uritoelasticsearchnode" index="${event-properties:item=indexName}-${date:format=yyyy.MM}" documentType="logEvent" includeAllProperties="true" layout="${message}" excludedProperties="agentSessionId,tenantId,organizationId,indexName" />
</target>
</target>

X-PACK 身份验证

Orchestrator 支持将 X-PACK 身份验证用于 Elasticsearch。要启用此功能,必须在 UiPath.Orchestrator.dll.config 文件的以下部分中添加 requireAuth="true" username="XPACKuser" password="p@$$w0rd"

<target name="robotElasticBuffer" xsi:type="BufferingWrapper" flushTimeout="5000">
        <target xsi:type="ElasticSearch" name="robotElastic" uri="http://elk-test.com" index="${event-properties:item=indexName}-${date:format=yyyy.MM}" documentType="logEvent" includeAllProperties="true" layout="${message}" excludedProperties="agentSessionId,tenantId,indexName" />
      </target>

该部分应如下所示:

<target name="serverElasticBuffer" xsi:type="BufferingWrapper" flushTimeout="5000">
<target xsi:type="ElasticSearch" name="serverElastic" requireAuth="true" username="XPACKuser" password="p@$$w0rd" uri="" index="serverdiagnostics-${date:format=yyyy.MM}" documentType="logEvent" includeAllProperties="true" layout="${machinename} ${message}" />
</target>

2 年前更新



Orchestrator 日志


建议的编辑仅限用于 API 参考页面

您只能建议对 Markdown 正文内容进行编辑,而不能建议对 API 规范进行编辑。