Automation Suite
2022.10
バナーの背景画像
Automation Suite インストール ガイド
最終更新日 2024年4月24日

ロボット ログを Elasticsearch に保存する

ロボット ログを Elasticsearch サーバーに保存する場合、基本構成と高度な構成の 2 種類の構成を使用できます。

基本構成では既定の機能が提供され、事前設定済みの Elasticsearch NLog ターゲットがアクティブ化されます。ターゲットは、バッファリング ターゲットにラップされた Elasticsearch ターゲットで構成されます。ほとんどのシナリオでは、この種類の構成で十分です。

ただし、ルールをさらにカスタマイズする必要がある場合は、高度な構成による方法を使用できます。

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

基本構成

  1. ArgoCD インターフェイスで uipath アプリケーションを見つけます。
  2. 左上隅の [APP DETAILS] ボタンをクリックしてから、[PARAMETERS] タブに移動します。
  3. [EDIT] をクリックし、次のパラメーターを右側の列で指定した値に変更したうえで、例を独自の値に置き換えます。

    パラメーター

    値 (Value)

    global.userInputs.orchestratorRobotLogsElasticUri

    例: https://elastic.example.com:9200

    末尾にスラッシュを入れないようにしてください。

    global.userInputs.orchestratorRobotLogsElasticAuthUsername

    例: elastic-user

    global.userInputs.orchestratorRobotLogsElasticAuthPassword

    例: elastic-password
  4. 変更を保存します。
  5. uipath アプリケーションを同期し、healthy ステートの応答を見ながら、プロセスが完了するまで待機します。

また、cluster_config.json ファイルを編集して、ロボット ログを Elasticsearch サーバーに保存するように構成することもできます。

基本構成でサポートされるのは Elasticsearch バージョン 7.x です。Elasticsearch 8.x の場合は、高度な構成を使用する必要があります。

高度な設定

重要: 次の手順に従って変更を加えると、システム全体の機能と安定性に悪影響を及ぼす可能性があります。変更を加えるのは、変更の影響を理解している場合だけにすることをお勧めします。
高度な構成では、NLog.config ターゲットを完全にカスタマイズできます。
  1. 上記の基本構成の手順に従います。
  2. ConfigMap の orchestrator-customconfignlog.json のパラメーターを編集します。
    1. 次のサンプルに基づいて、/tmp/nlog.custom.json ファイルを作成します。
    2. ./orchestrator_configurator.sh -l /tmp/nlog.custom.json を使用して、Orchestrator 構成ツールで ConfigMap を更新します。
注:

高度な構成では Elasticsearch バージョン 8.x もサポートされます。

Elasticsearch 7.x のサンプル

{
  "Nlog": {
    "targets": {
      "robotElasticBuffer": {
        "flushTimeout": 1000,
        "bufferSize": 1000,
        "slidingTimeout": false,
        "target": {
          "uri": "https://elastic.example.com:9200",
          "requireAuth": true,
          "username": "elastic-user",
          "password": "elastic-password",
          "index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
          "documentType": "logEvent",
          "includeAllProperties": true,
          "layout": "${message}",
          "excludedProperties": "agentSessionId,tenantId,indexName"
        }
      }
    }
  }
}{
  "Nlog": {
    "targets": {
      "robotElasticBuffer": {
        "flushTimeout": 1000,
        "bufferSize": 1000,
        "slidingTimeout": false,
        "target": {
          "uri": "https://elastic.example.com:9200",
          "requireAuth": true,
          "username": "elastic-user",
          "password": "elastic-password",
          "index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
          "documentType": "logEvent",
          "includeAllProperties": true,
          "layout": "${message}",
          "excludedProperties": "agentSessionId,tenantId,indexName"
        }
      }
    }
  }
}

Elasticsearch 8.x のサンプル

{
  "Nlog": {
    "targets": {
      "robotElasticBuffer": {
        "flushTimeout": 1000,
        "bufferSize": 1000,
        "slidingTimeout": false,
        "target": {
          "uri": "https://elastic.example.com:9200",
          "requireAuth": true,
          "username": "elastic-user",
          "password": "elastic-password",
          "index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
          "documentType": "",
          "includeAllProperties": true,
          "layout": "${message}",
          "excludedProperties": "agentSessionId,tenantId,indexName"
        }
      }
    }
  }
}{
  "Nlog": {
    "targets": {
      "robotElasticBuffer": {
        "flushTimeout": 1000,
        "bufferSize": 1000,
        "slidingTimeout": false,
        "target": {
          "uri": "https://elastic.example.com:9200",
          "requireAuth": true,
          "username": "elastic-user",
          "password": "elastic-password",
          "index": "${event-properties:item=indexName}-${date:format=yyyy.MM}",
          "documentType": "",
          "includeAllProperties": true,
          "layout": "${message}",
          "excludedProperties": "agentSessionId,tenantId,indexName"
        }
      }
    }
  }
}
  • 基本構成
  • 高度な設定

Was this page helpful?

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