Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

This Universal Extension is an interface to Rclone that provides the capability to monitor files/directories from across different cloud storages, as well as local or distributed file systems. Additionally and upon successful monitor, this extension publishes Local Universal Events. To properly handle these events and take action on them, this Universal Extension optionally can be attached as a Publisher to a Universal Monitor Task (see more details in section Cloud Data Monitor Events).
Rclone, is the open source command line program, that is utilized to accomplish all the actions supported in this Extension.

...

This integration requires a Universal Agent, a Python runtime to execute the Universal Task, and a Rclone executable.

Software Requirements for for Universal Template and Universal Task

Requires Python 3.7.0 or higher. Tested with the Universal Agent bundled Python distribution.

...

  1. This Universal Task requires the the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.

  2. To import the Universal Template into your Controller, follow these instructions.

  3. When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.

...

  1. The configuration file is following the INI format, and contains all required parameters and credentials to connect to a Storage System. All configuration options per Storage System can be found in the respective "Config Rclone documentation" .

  2. It is advised that account credentials, tokens, or any other essential information to be passed as an encrypted Resolvable Credential field. To set a value with the respective Credential field, please make sure to use the appropriate Credential function inside the configuration file.

    Note

    'Runtime Password' Credentials field supports values with up to 512 characters.

    Hard coded values can be provided in the script file, as well. However, it is not advised for security reasons.

  3. It is recommended to configure a storage system section, one to one with the Credential fields in this Universal Extension (please refer to the Input Fields section below).

  4. For local file system Storages, no credentials are required in the configuration file. The selected action will be executed with the Credentials that are provided in the "Agent Details" of the Universal Task. If no Credentials are provided for the used Agent, then the same user that runs ubroker daemon will be used.

  5. Script Type should be Data, and option Resolve UAC Variables should be enabled.


The indicative Configuration File below, contains the basic connection parameters (flags):

Note

Utilize the built-in Credential Functions, in order to properly resolve the associated Universal Task Credentials.

...

FieldInput typeDefault valueTypeDescription
ActionRequiredMonitor On CreateChoiceAction to be performed.

Available actions:
  • Monitor On Create
  • Monitor On Change
  • Monitor On Delete
Trigger On ExistenceOptionalFalseBooleanWhen this flag is enabled and objects already exist on the given Storage Filepath, an event will be published. Otherwise, Universal Task will keep monitoring for new objects creation.

Optional when Action Monitor On Create is selected.
Configuration FileRequired-ScriptRclone Configuration file, that contains all required parameters to connect to the Storage System.
Storage SystemOptional-Dynamic Choice FieldRemote or Local storage to execute the selected Action.
Execute the Dynamic Choice Field and retrieve all the available Storages from Configuration File.

This field is included as an Event Attribute.
Storage CredentialsOptional-CredentialCredentials needed to connect to the selected Storage System.

For Storage System of type local, the standard Agent's Credentials field should be provided.
Storage FilepathOptional-TextPath to monitor objects for the selected Action.

This field is included as an Event Attribute.
Update CredentialsOptionalFalseBooleanThis field needs to be used when Rclone executable updates Fields on its Configuration File during execution, that need to be stored as Credential Fields on the Universal Controller.

For example: when OneDrive Storage type is used. In this case, the existing configured token is exchanged by Rclone with a new one to establish the connection. This new token should be stored on Universal Controller for the next task execution. Please read Rclone limitations on OneDrive token refresh here.

This field is used in conjunction with fields Controller URL, Controller Credentials, Refresh Storage Credentials.
Controller URLOptional-TextController URL where Storage Credentials are stored.

Required when Update Credentials is checked.
Controller CredentialsOptional-CredentialsController user's credentials, used for logging and updating Storage Credentials will be updated. The Credentials definition should be as follows:
  • User as "Runtime User".
  • User Password as "Runtime Password".
Note: The provided user should have sufficient Credential permissions.

Required when Update Credentials is checked.
Refresh Storage CredentialsOptional-ArrayThis Array field is available when Update Credentials is set to True and used as a mapping table that indicates which field from the Configuration File of Rclone is used to update which Credential entry field on Universal Controller.

Populate this array with the following format:
  • Configuration File Details: "<Storage Storage>"."<Configuration File's field to be refreshed by Rclone>"
  • Storage Credentials Details: "<Storage Credentials name>"."<Storage Credentials field to be updated>"
The result of this action is that the Configuration file's field value, is copied to the provided Storage Credential's field. Each line of this Array is evaluated, and related mapping is performed.
Note: Refresh of Storage Credentials is performed via Controller's REST API. See Network and Connectivity Requirements
Monitor Time IntervalOptional300IntegerInterval period in seconds used to monitor the given Storage Filepath.
Use FilterOptional-- None --ChoiceThe filter type that is applied on the Action.

Available options:
  • -- None --
  • Include
  • Exclude
FilterOptional-TextFilter based on Rclone filtering rules that is applied on the Action.

Required when Use Filter is checked.
Files OnlyOptionalFalseBooleanWhen enabled, directories will be ignored and only files will be monitored.
Use Storage System Modified TimeOptionalTrueBooleanWhen enabled, the time of the Storage System will be observed as the object's modification time, instead of the original object's modified time stored as metadata.

Note: Having this option enabled, increases performance.
Recursion DepthOptional1IntegerRecursion depth that is applied. Default value 1 means that no recursion will be applied.
Additional OptionsOptional-TextSpace separated Rclone options that applied to the selected Action.
Correlation IDOptional-TextUse this field optionally to pass extra custom information to the published event (for example: provide the parent Workflow task instance ID).
This field is included as an Event Attribute.

...

  • Python code modifications should not be done.
  • Template Modifications
    • General Section

      • "Name", "Extension", "Variable Prefix", "Icon" should not be changed.
    • Universal Template Details Section

      • "Template Type", "Agent Type", "Send Extension Variables", "Always Cancel on Force Finish" should not be changed.
    • Result Processing Defaults Section

      • Success and Failure Exit codes should not be changed.
      • Success and Failure Output processing should not be changed.
    • Fields Restriction Section
      The setup of the template does not impose any restrictions, However with respect to "Exit Code Processing Fields" section.

      1. Success/Failure exit codes need to be respected.
      2. In principle, as STDERR and STDOUT outputs can change in follow-up releases of this integration, they should not be considered as a reliable source for determining success or failure of a task.
      3. In Event Templates fields "Name", "Time To Live", "Unmapped Attribute Policy", "Attribute Name", "Attribute Type", should not be changed.

      Note

      The suggested configuration for this Universal Extension does not require any updates on Time To Live. However, this field can be tuned for troubleshooting purposes, affecting immediately the time (in minutes) that events are stored in Controller's Event Queue. Configure a low Time To Live value (for example 1 minute), if it is required to review the published Events.

      Use Server Operation Inspect Universal Events to view all Universal Events in Controller's event queue.


...

This document references the following documents.

Document LinkDescription
Universal TemplatesUser documentation for creating Universal Templates in the Universal Controller user interface.
Universal TasksUser documentation for creating Universal Tasks in the Universal Controller user interface.
Universal Event TemplatesUser documentation for Universal Event Template fields definition.
Universal Monitor TasksUser documentation for creating Universal Monitor Tasks in the Universal Controller user interface.
RcloneRclone official documentation.
Rclone InstallInstallation instructions.
Rclone DownloadsDownload links for Linux, Windows, MacOS.
Rclone Storage Systems configurationConfiguration file details.
Rclone Exit CodesRclone exit codes list.

...