automation-suite
2022.4
false
UiPath logo, featuring letters U and I in white
Automation Suite Installation Guide
Last updated Nov 21, 2024

Saving robot logs to Elasticsearch

Saving robot logs to an Elasticsearch server can be achieved through two types of configuration: basic and advanced.

The basic configuration provides default functionality that activates the preconfigured Elasticsearch NLog target, which is made up of an Elasticsearch target wrapped in a Buffering target. This type of configuration is enough in most scenarios.

However, if you need to further customize the rules, you can use the advanced configuration method.

Note: The option to save robot logs to an Elasticsearch server only becomes effective once you configure it, and is not applied retroactively. This means that you will no longer have access to any logs that were already in the database at the time you configured the option, because logs can only be retrieved and displayed from a single destination.

Basic configuration

  1. Locate the uipath application in the ArgoCD interface.
  2. Click the APP DETAILS button in the top left corner, then navigate to the PARAMETERS tab.
  3. Click EDIT, then update the following parameters with the values specified in the right-hand column, replacing the examples with your own values:

    Parameter

    Value

    global.userInputs.orchestratorRobotLogsElasticUri

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

    Make sure you do not include a trailing slash.

    global.userInputs.orchestratorRobotLogsElasticAuthUsername

    Example: elastic-user

    global.userInputs.orchestratorRobotLogsElasticAuthPassword

    Example: elastic-password
  4. Save your changes.
  5. Synchronize the uipath application and wait for the process to finish with a healthy state response.

You can also configure robot logs to be saved to an Elasticsearch server by editing the cluster_config.json file.

The basic configuration supports Elasticsearch version 7.x. For Elasticsearch 8.x, you need to use the advanced configuration.

Advanced Configuration

Important: Any changes you make per the steps below can negatively affect the functionality and stability of the entire system. It is advisable to only make changes if you understand their consequences.
The advanced configuration allows you to fully customize your NLog.config target.
  1. Follow the basic configuration steps described above.
  2. Edit the nlog.json parameters in orchestrator-customconfig in ConfigMap.
    1. Create a /tmp/nlog.custom.json file based on the sample below.
    2. Use ./orchestrator_configurator.sh -l /tmp/nlog.custom.json to update ConfigMap in the Orchestrator Configurator Tool.

The advanced configuration also supports Elasticsearch version 8.x.

Sample for 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"
        }
      }
    }
  }
}

Sample for 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"
        }
      }
    }
  }
}
  • Basic configuration
  • Advanced Configuration

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo White
Trust and Security
© 2005-2024 UiPath. All rights reserved.