insights
2024.10
true
  • Release Notes
    • 2024.10.0
  • Getting Started
  • Access and Permissions
  • Installation and Upgrade
  • Interacting with Insights
  • Historical data export
  • Logs
    • Configuring Log Rules
    • Log Collector
  • Performance and Scalability
UiPath logo, featuring letters U and I in white
Insights
Automation CloudAutomation Cloud Public SectorAutomation SuiteStandalone
Last updated Oct 25, 2024

Configuring Log Rules

Overview

Robot logs capture diagnostic and execution logs. You can configure the conditions for which Robot logs are ingested by Insights. For example, you only want to capture logs for Processes that include a specific name.

For more information, see Robot logs.

When to Configure Log Rules

  • After Insights installation.
  • After Insights upgrade.
  • When you want to add or configure existing log rules.

Default Log Rules

The default settings for Robot logs ingested by Insights include Ingest only last logs and error logs. The following sections show default log rules based on the Insights version that you are running.

Default Log Rules for Versions 2022.4 and above

In this example, the last logs and Error logs for all processes are ingested. This version of Insights ingests the last Info level from a Robot that has executed a process, alongside process and any Error level logs, as shown in the following example.

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
        <filters defaultAction="Ignore">
          <when condition="level &gt;= LogLevel.Error or ends-with('${message}',' execution ended')" action="Log" />
          <when condition="'${ui-robot-logs-num-custom-fields}' &gt; 1 and not ends-with('${message}', ' execution started')" action="Log" />
        </filters><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
        <filters defaultAction="Ignore">
          <when condition="level &gt;= LogLevel.Error or ends-with('${message}',' execution ended')" action="Log" />
          <when condition="'${ui-robot-logs-num-custom-fields}' &gt; 1 and not ends-with('${message}', ' execution started')" action="Log" />
        </filters>

Default Log Rules for Version 2021.10

In this example, all logs (Info level and above) for all processes are ingested. This version of Insights ingests all logs (Info level and a) generated by the Robot for all processes, as shown in the following example.

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs"/><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs"/>

Configure Log Rules

Note:
  • Only administrators should change the values in the Orchestrator configuration file.
  • Back up the UiPath.Orchestrator.dll.config file before proceeding. You can find the file in C:\Program Files (x86)\UiPath\Orchestrator.
  • Restart the website after making changes to Orchestrator configuration file.
  • All parameters are case sensitive.
  • For best performance, Robot Logs generated over a two-year timeframe shouldn't exceed 200 million records.
  • Use the NLog configuration file to capture data that is relevant for Insights in your environment and reduce the number of records generated by Robot Logs.
  1. Navigate to C:\Program Files (x86)\UiPath\Orchestrator and open the UiPath.Orchestrator.dll.config file to modify Orchestrator settings.
  2. Find the Robot Logs parameters (e.g., <logger name="Robot.*" environmentSpecificConfiguration/>)
  3. Configure a filter with a default action (e.g., filters defaultAction="Ignore").
  4. Configure conditions based on the log level or other events (see Log rules example).
  5. Save the file and restart Orchestrator.

For more information on configuring the Orchestrator configuration file, see UiPath.Orchestrator.dll.config.

Log Rules Examples

The following examples show custom log rule configurations for Info and Error level logs. By setting specific conditions, Insights ingests logs only for the processes that you configure.

Ingest All Logs and Any Error Logs for a Particular Process

In the following example, Insights ingests all Info level and Error logs for the following process names: payment disp, 68fields, or 68fields_20.
<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="equals('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20')" action="Log" />
    </filters>
  </logger><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="equals('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20')" action="Log" />
    </filters>
  </logger>

Ingest Only Last and Error Logs for a Particular Process

In the following example, Insights ingests only last Info level logs and Error logs for the following process names: payment disp, 68fields, or 68fields_20.

Only Error level logs and the last log of each Robot are logged in to Insights.

<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="(level >= LogLevel.Error or ends-with('${message}',' execution ended')) and (contains('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20'))" action="Log" />
    </filters>
  </logger><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Ignore">
      <when condition="(level >= LogLevel.Error or ends-with('${message}',' execution ended')) and (contains('${event-properties:item=processName}', 'payment disp') or equals('${event-properties:item=processName}', '68fields') or equals('${event-properties:item=processName}', '68fields_20'))" action="Log" />
    </filters>
  </logger>

Do Not Ingest Logs for a Particular Process

In the following example, Insights does not ingest any logs for the process name: payment disp.
<logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Log">
      <when condition="equals('${event-properties:item=processName}', 'payment disp')" action="Ignore" />
    </filters>
  </logger><logger name="Robot.*" ruleName="insightsRobotLogsRule" enabled="true" minlevel="Info" writeTo="insightsRobotLogs">
    <filters defaultAction="Log">
      <when condition="equals('${event-properties:item=processName}', 'payment disp')" action="Ignore" />
    </filters>
  </logger>

Related Articles

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.