Orchestrator
2020.10
False
横幅背景图像
不在支持范围内
Orchestrator 用户指南
上次更新日期 2023年12月12日

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 执行日志

Orchestrator 执行日志由与其连接的机器人发送,并显示在“作业”或“机器人”页面的“日志”部分中。应用程序从机器人接收数据,添加自己的参数(TenantID、FolderID),并将消息转发到不同的目标,如 UiPath.Orchestrator.dll.config 文件的 <nlog> 部分中所指定。

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" /><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" />
其他目标可以通过配置 UiPath.Orchestrator.dll.config 文件添加到日志中。可在此处找到可用目标列表。

Elasticsearch 服务器

默认情况下,从安装脚本中配置 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><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="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><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>

此页面是否有帮助?

获取您需要的帮助
了解 RPA - 自动化课程
UiPath Community 论坛
Uipath 白色徽标
信任与安全
© 2005-2024 UiPath. All rights reserved.