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.
- NotFound 例外:
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" />
UiPath.Orchestrator.dll.config
ファイルを設定することで、他のターゲットをログに追加できます。利用可能なターゲットのリストはこちらをご覧ください。
If the number of Robot logs stored in the table is higher than 1 million, we recommend creating the following index for improved search performance:
CREATE NONCLUSTERED INDEX [IX_Search] ON [dbo].[Logs]
(
[TenantId] ASC,
[OrganizationUnitId] ASC,
[Level] ASC,
[TimeStamp] DESC
)WITH (STATISTICS_NORECOMPUTE = OFF, DROP_EXISTING = OFF, ONLINE = OFF, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
GO
Elasticsearch サーバー
By default, there’s an Elasticsearch target configured from the installation script. The index is different for each tenant, but this can be configured from the specified target in the <nlog>
section.
Elasticsearch バージョン 8.0 未満の場合:
<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>
Elasticsearch バージョン 8.0 以上の場合:
<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="" includeAllProperties="true" layout="${message}" excludedProperties="agentSessionId,tenantId,organizationId,indexName" />
</target>
</target>
バージョン 8.0 以降の Elasticsearch が正常に機能するために、これらのパラメーターは次のように設定されます。
documentType
は空です。enableApiVersioningHeader
はtrue
に設定されます。
バージョン 7.16.3 未満の Elasticsearch
Elasticsearch バージョン 7.16.3 が推奨されますが、それよりも前のバージョンを使用するには、Nlog ターゲット (<target xsi:type="ElasticSearch"
) で disableProductCheckStatus
パラメーターを true
に設定します。
このパラメーターは非表示で、既定値は false
です。
X-PACK 認証
注:
Basic またはトライアル ライセンスの場合、Elasticsearch のセキュリティ機能は既定で無効化されています。この機能を有効化することを強くお勧めします。
ユーザー名とパスワードによる認証
ユーザー名とパスワードによる認証を有効化するには、以下の手順を実行する必要があります。
- Elasticsearch サーバーを以下のように設定します。
elasticsearch.yml
設定ファイルにxpack.security.enabled
の設定を追加します。- ユーザー名とパスワードを設定します。
詳細については、Elasticsearch のドキュメントをご覧ください。
- Orchestrator の
UiPath.Orchestrator.dll.config
ファイルを以下のように設定します。
-
オプション 1: NLog ターゲットを使用しない場合は、パラメーター
Logs.Elasticsearch.Username
とLogs.Elasticsearch.Password
を設定する必要があります。これらの値が、手順 1 の Elasticsearch の設定に一致していることを確認してください。 -
オプション 2:
Logs.RobotLogs.ReadTarget
が NLog のターゲットに設定されていて (例:robotElasticBuffer
)、Logs.Elasticsearch.Nodes
の設定が指定されていない場合は、requireAuth="true" username="XPACKuser" password="p@$$w0rd"
を追加してターゲットを設定します。これらのパラメーター値が、手順 1 の Elasticsearch の設定と一致していることを確認してください。
For more on these parameters, see theUiPath.Orchestrator.dll.config
page.
以下に設定例を示します。
<target name="robotElasticBuffer" xsi:type="BufferingWrapper" flushTimeout="5000">
<target xsi:type="ElasticSearch" name="robotElastic" uri="" requireAuth="true" username="XPACKusername" password="p@$$w0rd" index="${event-properties:item=indexName}-${date:format=yyyy.MM}" documentType="logEvent" includeAllProperties="true" layout="${message}" excludedProperties="agentSessionId,tenantId,indexName" />
</target>
- オプション 3:
Logs.RobotLogs.ReadTarget
が NLog のターゲットに設定されていて (例:robotElasticBuffer
)、Elasticsearch のノードがLogs.Elasticsearch.Nodes
の設定で指定されている場合は、このノードを明示的に設定する必要があります (NLog ターゲットの設定より優先されるため)。さらに、requireAuth="true" username="XPACKuser" password="p@$$w0rd"
を追加することも忘れないでください。これらのパラメーター値が、手順 1 の Elasticsearch の設定と一致していることを確認してください。
OAuth 2.0 認証
Elasticsearch の認証方法を OAuth2 に切り換えるには、以下の手順を実行する必要があります。このトークン ベースの認証方法に切り換えるには、現在の資格情報を入力する必要があることに注意してください。
- Elasticsearch サーバーを以下のように設定します。
a. トランスポート層の TLS (HTTPS) を有効化します。
b. 設定ファイルelasticsearch.yml
の、以下の設定を更新します。xpack.security.authc.token.enabled: true
xpack.security.enabled: true
xpack.security.authc.token.timeout
- この設定は任意です。トークンの有効期間を制御します。既定の設定値は 20 分です。
詳細については、Elasticsearch のドキュメントをご覧ください。
- Orchestrator の
UiPath.Orchestrator.dll.config
ファイルにある以下のパラメーターを、手順 1 で選択した設定を反映するように変更します。Logs.Elasticsearch.TlsEnabled = ”true”
- 既定で、このパラメーターはtrue
に設定され、TLC (HTTPS) が有効化されます。Logs.Elasticsearch.OAuthEnabled = ”true”
- 既定で、このパラメーターはfalse
に設定されます。詳細については、Logs.Elasticsearch.OAuthEnabled をご覧ください。Logs.Elasticsearch.OAuthExpireInSeconds = ”1200”
- Elasticsearch のxpack.security.authc.token.timeout
の設定で既定値の1200
が変更されていないかぎり、このパラメーターの指定は任意です。このパラメーターは、Elasticsearch の設定と同じ値である必要があります。詳細については、Logs.Elasticsearch.OAuthExpireInSeconds をご覧ください。
注:
最初の 2 つの手順は、ログを読み取るためのトークン ベースの認証メカニズムを設定するためのものです。NLog を使用している場合は、追加の手順が必要になります。
- NLog の OAuth2 を有効化するには、Orchestrator の
UiPath.Orchestrator.dll.config
ファイルで以下のパラメーターを設定することも忘れないでください。Elasticsearch で認証に使用するユーザー名とパスワードの入力が必要です。初期トークンが、これらの資格情報に基づいて生成されるからです。OAuthEnabled = “true”
- 既定ではfalse
に設定されています。詳細については、「UiPath.Orchestrator.dll.config」のページをご覧ください。
重要
Logs.RobotLogs.ReadTarget
が NLog のターゲットに設定され (例:robotElasticBuffer
)、Logs.Elasticsearch.Nodes
が設定されていない場合、Logs.Elasticsearch.OAuthEnabled
には、NLog ターゲットの設定が入力されます。ユーザー名とパスワードについても、同じロジックが適用されます。
約 1 か月前に更新