UiPath Documentation
automation-suite
2024.10
false
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。
UiPath logo, featuring letters U and I in white

OpenShift の Automation Suite のインストール ガイド

最終更新日時 2026年4月15日

NLog を構成する

NLog 拡張機能を追加する

以下の拡張機能が Orchestrator によって既定で読み込まれるため、フォルダーまたは NLog の構成にこれらの拡張機能を含める必要はありません。

  • NLog.Targets.ElasticSearch
  • UiPath.Orchestrator.Logs.Elasticsearch
  • Microsoft.ApplicationInsights.NLogTarget
  • NLog.Extensions.AzureEventHub

この設定で使用できるのは Linux 対応の拡張機能のみであるため、選択した NLog 拡張機能がこのルールに準拠していることを確認してください。

拡張機能を使用できるようにするには、クラスター ストレージに拡張機能をアップロードする必要があります。 uipathctlコマンドラインツールは、uipathctl config orchestrator uploadコマンドを使用してこれを行うことができます。

uipathctl config orchestrator upload --nlog-extensions-directory /path/to/extensions/directory
uipathctl config orchestrator upload --nlog-extensions-directory /path/to/extensions/directory

外部ストレージ構成をクラスター レベルで使用する場合は、それを示すために --is-external-storage パラメーターを含める必要があります。

NLog の高度な設定

NLog の高度な構成を作成する

  1. 拡張機能、ターゲット、ルールといった標準的なセクションを含む nlog.config.json ファイルを作成します。

    拡張機能セクションは、assemblyFile を使用して拡張機能アセンブリを指定する項目の配列と、アセンブリのパスです。

    カスタムの NLog プラグインが読み込まれた場合 (「NLog 拡張機能を追加する」のセクションを参照)、そのプラグインは extensions セクションで参照されます。

  2. nlog.config.json ファイルでターゲットとルールを構成します。

  3. uipathctl コマンド ライン ツールを使用して、nlog.config.json ファイルを適用します。

    uipathctl config orchestrator update-config --nlog-config nlog.custom.json
    uipathctl config orchestrator update-config --nlog-config nlog.custom.json
    
    重要:

    この操作を行うと、既存のカスタム NLog 構成が上書きされます。既存の設定を確認するには、次のコマンドを使用します。

    uipathctl config orchestrator get-config --nlog-config
    uipathctl config orchestrator get-config --nlog-config
    

Azure BLOB にログを書き込む nlog.config.json ファイルの例

{   "NLog": {
        "extensions": [
            { "assemblyFile": "NLog.Extensions.AzureBlobStorage.dll" }
        ],
        "targets": {
            "azureBlob": {
                "type": "AzureBlobStorage",
                "connectionString": "DefaultEndpointsProtocol=https;AccountName=test;AccountKey=key;EndpointSuffix=core.windows.net",
                "container": "orchestratorlogs",
                "blobName": "${date:format=yyyy-MM-dd hh.mm}",
                "layout": {
                  "type": "JsonLayout",
                  "includeAllProperties": true,
                  "Attributes": [
                    {"name": "ts","layout": "${longdate}"},
                    {"name": "level","layout": "${level:upperCase=true}"},
                    {"name": "logger","layout": "${logger}"},
                    {"name": "message","layout": "${message}"},
                    {"name": "exception","layout": "${onexception:${ui-pretty-exception}}"}
                  ]
                }
            }
        },
        "rules": { "70_Final": { "writeTo": "stdout,azureBlob" } }
    }
}
{   "NLog": {
        "extensions": [
            { "assemblyFile": "NLog.Extensions.AzureBlobStorage.dll" }
        ],
        "targets": {
            "azureBlob": {
                "type": "AzureBlobStorage",
                "connectionString": "DefaultEndpointsProtocol=https;AccountName=test;AccountKey=key;EndpointSuffix=core.windows.net",
                "container": "orchestratorlogs",
                "blobName": "${date:format=yyyy-MM-dd hh.mm}",
                "layout": {
                  "type": "JsonLayout",
                  "includeAllProperties": true,
                  "Attributes": [
                    {"name": "ts","layout": "${longdate}"},
                    {"name": "level","layout": "${level:upperCase=true}"},
                    {"name": "logger","layout": "${logger}"},
                    {"name": "message","layout": "${message}"},
                    {"name": "exception","layout": "${onexception:${ui-pretty-exception}}"}
                  ]
                }
            }
        },
        "rules": { "70_Final": { "writeTo": "stdout,azureBlob" } }
    }
}

Splunk にロボット ログを書き込む nlog.config.json ファイルの例を以下に示します。

{
    "Nlog": {
        "extensions": [
            { "assemblyFile": "NLog.Targets.Splunk.dll" },
            { "assembly": "UiPath.Orchestrator.Logs.DatabaseBulk.NLogTarget" }
        ],
        "targets": {
            "Splunk": {
                "type": "BufferingWrapper",
                "flushTimeout": 5000,
                "target": {
                    "type": "SplunkHttpEventCollector",
                    "serverUrl": "http://splunk.example.com",
                    "token": "splunk-token",
                    "channel": "",
                    "source": "${logger}",
                    "sourceType": "_json",
                    "index": "uipath",
                    "retriesOnError": "0",
                    "batchSizeBytes": "0",
                    "batchSizeCount": "0",
                    "includeEventProperties": "true",
                    "includePositionalParameters": "true",
                    "includeMdlc": "true",
                    "maxConnectionsPerServer": "10",
                    "ignoreSslErrors": "false",
                    "useProxy": "false",
                    "proxyUrl": "",
                    "proxyUser": "",
                    "proxyPassword": ""
                }
            }
        },
        "rules": {
            "20_Robot_Primary": { "writeTo": "Splunk,database,insightsRobotLogs" }
        }
    }
}
{
    "Nlog": {
        "extensions": [
            { "assemblyFile": "NLog.Targets.Splunk.dll" },
            { "assembly": "UiPath.Orchestrator.Logs.DatabaseBulk.NLogTarget" }
        ],
        "targets": {
            "Splunk": {
                "type": "BufferingWrapper",
                "flushTimeout": 5000,
                "target": {
                    "type": "SplunkHttpEventCollector",
                    "serverUrl": "http://splunk.example.com",
                    "token": "splunk-token",
                    "channel": "",
                    "source": "${logger}",
                    "sourceType": "_json",
                    "index": "uipath",
                    "retriesOnError": "0",
                    "batchSizeBytes": "0",
                    "batchSizeCount": "0",
                    "includeEventProperties": "true",
                    "includePositionalParameters": "true",
                    "includeMdlc": "true",
                    "maxConnectionsPerServer": "10",
                    "ignoreSslErrors": "false",
                    "useProxy": "false",
                    "proxyUrl": "",
                    "proxyUser": "",
                    "proxyPassword": ""
                }
            }
        },
        "rules": {
            "20_Robot_Primary": { "writeTo": "Splunk,database,insightsRobotLogs" }
        }
    }
}

NLog の高度な構成を更新する

NLog の構成を更新するために必要な uipathctl コマンドは、次のとおりです。

  • uipathctl config orchestrator get-config --nlog-config- 現在の構成がキーと値のペアの json ファイルにエクスポートされ、編集可能になります。詳しくは、こちらをご覧ください。
  • uipathctl config orchestrator update-config --nlog-config nlog.config.json - 変更内容で設定が更新されます。詳しくは、こちらをご覧ください。
  1. 次のコマンドを使用して、現在のカスタム NLog 構成を json ファイルにエクスポートします。
    uipathctl config orchestrator get-config --nlog-config > nlog.config.json
    uipathctl config orchestrator get-config --nlog-config > nlog.config.json
    
  2. エクスポートした nlog.config.json ファイルを必要に応じて編集します。 設定を追加、削除、または変更できます。
    注:

    変更が必要になるたびにファイルを再度エクスポートする必要があります。更新によって NLog の設定がすべて上書きされるためです。

  3. 次のコマンドを使用して NLog 構成を更新します。
    uipathctl config orchestrator update-config --nlog-config nlog.config.json
    orchestrator config updated
    uipathctl config orchestrator update-config --nlog-config nlog.config.json
    orchestrator config updated
    
  • NLog 拡張機能を追加する
  • NLog の高度な設定
  • NLog の高度な構成を作成する
  • NLog の高度な構成を更新する

このページは役に立ちましたか?

接続

ヘルプ リソース サポート

学習する UiPath アカデミー

質問する UiPath フォーラム

最新情報を取得