Orchestrator
v2023.4
バナーの背景画像
Orchestrator ユーザー ガイド
最終更新日 2024年3月4日

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.
  • NotFound 例外:

    • QueueName1 does not exist.

Orchestrator 実行ログ

Orchestrator 実行ログが、接続されているロボットから送信されて、[ジョブ] または [ロボット] ページの [ログ] セクションに表示されます。アプリケーションはロボットからデータを受け取り、独自のパラメーター (テナント IDフォルダー ID) を追加してから、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 ファイルを設定することで、他のターゲットをログに追加できます。利用可能なターゲットのリストはこちらをご覧ください。
注:

Orchestrator をアップグレードすると、NLog ターゲットが削除され、以下のように再作成されます。

  • 2022.4 にアップグレードすると、NLog データベースのターゲットは既定値に戻ります。
  • 2022.10 にアップグレードすると、NLog データベースのターゲットは削除され、新しく改良されたターゲットに置き換えられます。
対象となるのは、databasemonitoring、および insightsRobotLogs の各ターゲットです。
重要: 表に格納されるロボット ログの数が 100 万を超える場合は、検索性能を改善するために以下のインデックスを作成することをお勧めします。
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]
GOCREATE 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 サーバー

既定では、インストール スクリプトから構成された Elasticsearch ターゲットが存在します。インデックスはテナントごとに異なりますが、<nlog> セクションで指定されたターゲットから構成できます。
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><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="" enableApiVersioningHeader="true" 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="" enableApiVersioningHeader="true" includeAllProperties="true" layout="${message}" excludedProperties="agentSessionId,tenantId,organizationId,indexName" />
</target>
</target>

バージョン 8.0 以降の Elasticsearch が正常に機能するために、これらのパラメーターは次のように設定されます。

  • documentType は空です。
  • enableApiVersioningHeadertrue に設定されます。
メモ: ロボット ログを Elasticsearch サーバーに保存するオプションは、一度構成した後にのみ有効となり、過去にさかのぼって適用されることはありません。 つまり、ログは単一の宛先からしか取得および表示できないため、オプションの構成時にデータベースに既に存在していたログにはアクセスできなくなります。

X-PACK 認証

注: Basic またはトライアル ライセンスの場合、Elasticsearch のセキュリティ機能は既定で無効化されています。この機能を有効化することを強くお勧めします。

ユーザー名とパスワードによる認証

ユーザー名とパスワードによる認証を有効化するには、以下の手順を実行する必要があります。

  1. Elasticsearch サーバーを以下のように設定します。
    • elasticsearch.yml 設定ファイルに xpack.security.enabled の設定を追加します。
    • ユーザー名とパスワードを設定します。

      詳細については、Elasticsearch のドキュメントをご覧ください。

  2. Orchestrator の UiPath.Orchestrator.dll.config ファイルを以下のように設定します。
  • オプション 1: NLog ターゲットを使用しない場合は、パラメーター Logs.Elasticsearch.UsernameLogs.Elasticsearch.Password を設定する必要があります。これらの値が、手順 1 の Elasticsearch の設定に一致していることを確認してください。
  • オプション 2: Logs.RobotLogs.ReadTarget が NLog のターゲットに設定されていて (例: robotElasticBuffer)、Logs.Elasticsearch.Nodes の設定が指定されていない場合は、requireAuth="true" username="XPACKuser" password="p@$$w0rd" を追加してターゲットを設定します。これらのパラメーター値が、手順 1 の Elasticsearch の設定と一致していることを確認してください。

    詳細については、「UiPath.Orchestrator.dll.config」のページをご覧ください。

    以下に設定例を示します。

    <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><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 に切り換えるには、以下の手順を実行する必要があります。このトークン ベースの認証方法に切り換えるには、現在の資格情報を入力する必要があることに注意してください。

  1. Elasticsearch サーバーを以下のように設定します。

    a. トランスポート層の TLS (HTTPS) を有効化します。

    b. 設定ファイル elasticsearch.yml の、以下の設定を更新します。
    • xpack.security.authc.token.enabled: true
    • xpack.security.enabled: true
    • xpack.security.authc.token.timeout - この設定は任意です。トークンの有効期間を制御します。既定の設定値は 20 分です。

      詳細については、Elasticsearch のドキュメントをご覧ください。

  2. 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 を使用している場合は、追加の手順が必要になります。
  3. 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 ターゲットの設定が入力されます。ユーザー名とパスワードについても、同じロジックが適用されます。

API キー認証

API キーによる認証を有効化するには、以下の手順に従います。

  1. こちらの手順に従って API キーを生成します。
  2. API キーを Azure Key Vault にシークレットとして保存します。
  3. 以下の Nlog ターゲット パラメーターに実際のデータを設定します。これにより、Orchestrator と Key Vault 間に接続が作成され、キーを取得できるようになります。
    apiKeyEnabled="true"
    apiKeyProvider="AzureKeyVault"
    apiKeySecretName="<SecretName>"
    azureKeyVaultUri="<KeyVaultUri>"
    azureKeyVaultDirectoryId="<KeyVaultDirectoryId>"
    azureKeyVaultClientId="<KeyVaultClientId>"
    azureKeyVaultCertificateThumbprint="<KeyVaultCertificateThumbprint>"
    azureKeyVaultCertificateStoreLocation="CurrentUser/LocalMachine"apiKeyEnabled="true"
    apiKeyProvider="AzureKeyVault"
    apiKeySecretName="<SecretName>"
    azureKeyVaultUri="<KeyVaultUri>"
    azureKeyVaultDirectoryId="<KeyVaultDirectoryId>"
    azureKeyVaultClientId="<KeyVaultClientId>"
    azureKeyVaultCertificateThumbprint="<KeyVaultCertificateThumbprint>"
    azureKeyVaultCertificateStoreLocation="CurrentUser/LocalMachine"

    以下のパラメーターを実際の値に編集する必要があります。

    • <SecretName> - Key Vault で API キーに設定した名前
    • <KeyVaultUri> - Key Vault の URI
    • <KeyVaultDirectoryId> - Key Vault ディレクトリ ID
    • <KeyVaultClientId> - Key Vault のクライアント ID
    • <KeyVaultCertificateThumbprint> - Key Vault 証明書の拇印
    • CurrentUser/LocalMachine - 証明書が保存されている場所

API キーの有効期限

既定では、API キーに有効期限はありません。ただし、有効期限を設定することもできます。

API キーに有効期限を設定する場合は、Orchestrator が常に有効なキーを取得できるよう、有効期限の前に新しいキーを生成して Key Vault に保存する必要があります。

Orchestrator は、15 分ごとにキー コンテナーから API キーを読み取ります。したがって、15 分以内に新しいキーが反映されるようにする必要があります。

Was this page helpful?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
UiPath ロゴ (白)
信頼とセキュリティ
© 2005-2024 UiPath. All rights reserved.