Your use of this download is governed by Stonebranch’s Terms of Use, which are available at Stonebranch Integration Hub - Terms of Use.
Template Name | Extension Name | Version | Status |
---|---|---|---|
Cloud Data Monitor | ue-cloud-dm | 2 (Current 2.0.1) | Fixes and new features are introduced. |
Cloud Data Monitor | ue-cloud-dm | 1 | Hot Fixes Only (Until UAC 7.5 is End of Support) |
Refer to Changelog for version history information.
Version 2.0.0 is a major release and introduces breaking changes that might affect some users depending on their setup. Administrators are strongly advised to refer to Changelog for more information on the changes introduced in this release. Refer also to the Migration Guide to apply changes in existing task definitions. |
One of the key use cases for Service Orchestration and Automation Platforms is the ability to detect changes in files or directories and respond to these events by executing specific actions.
This integration enables monitoring of files and directories across various local and cloud storage systems. When a change is detected, Local Universal Events are triggered and can be processed within Universal Controller, such as initiating a task or workflow.
This Universal Extension supports the following key features:
Feature | Description |
---|---|
Monitoring |
|
Options |
|
Universal Events |
|
Rclone |
|
This integration requires a Universal Agent, and a Python runtime to execute the Universal Task. The following are the requirements for Version 2
Area | Details |
---|---|
Python Version | Requires Python 3.11. Tested with Python 3.11.6. |
Universal Agent Compatibility |
|
Universal Controller Compatibility | Universal Controller Version >= 7.6.0.0. |
Network and Connectivity | Universal Agent should be able to establish a connection with:
|
This integration supports the following actions.
This action enables monitoring for the creation of one or multiple objects. The object can either be a file or a directory. Selecting this action enables the Trigger On Existence option, which treats the initial files of the directory as a file creation event. If this option is enabled, the user has to set a filter based on rclone filtering rules.
User Scenario: Monitor On Create minimum configuration. | User Scenario: Monitor On Create with the Trigger On Existence option enabled. The Filter option is used to select specific files. |
This extension provides EXTENSION output on Cancel or on Failure.
OutputType | Description | Examples | ||
---|---|---|---|---|
EXTENSION | The EXTENSION OUTPUT provides the following information:
|
|
The Monitor On Change action monitors if the object's modification time has been updated, while the Monitor On Delete action monitors whether an object has been deleted. These two actions share the same configuration.
User Scenario: Monitor On Change with a custom Event Tag and the Use System Storage Modified Time field selected. | User Scenario: Monitor On Delete using a Filter and the Files Only field. The Filter option is used to select specific files. |
This extension provides EXTENSION output on Cancel, or on Failure.
OutputType | Description | Examples | ||
---|---|---|---|---|
EXTENSION | The extension output provides the following information:
|
|
The input fields for this Universal Extension are described below.
Field | Input type | Default value | Type | Description | Version Information |
---|---|---|---|---|---|
Action | Required | Monitor On Create | Choice | Action to be performed. Available actions:
This field is included as an Event Attribute. | Introduced in 1.0.0 |
Optional | False | Boolean | When this flag is enabled and objects already exist on the given storage, an event will be published. Otherwise, the Universal Task will keep monitoring for new object creation. Optional when Action "Monitor on Create" is selected. | Introduced in 1.0.0 | |
Configuration File | Required | - | Script | This integration depends on Rclone. This field models the Rclone Configuration file, which contains all the required parameters to connect to the Storage System. The filename should have the ".conf" suffix. Example: rclone.conf | Introduced in 1.0.0 |
Storage System | Required | - | Dynamic Choice Field | The remote or Local storage to execute the selected Action. The magnifier button next to the field can be used to retrieve all available Storage Systems from the Configuration File. This field is included as an Event Attribute. | Introduced in 1.0.0 |
Storage Credentials | Optional | - | Credential | Credentials needed to connect to the selected Storage System. From Universal Controller 7.6 onwards, a variable that holds the Credential Name can be used when the related checkbox is selected. In this case, the content of this field should be | Introduced in 1.0.0 |
Storage Filepath | Optional | - | Text | The path to monitor objects for the selected Action. This field is included as an Event Attribute. | Introduced in 1.0.0 |
Update Credentials | Optional | False | Boolean | If the remote storage uses OAuth for its authorization, Rclone can be adjusted to refresh the respective token in its Configuration File during execution time. Enabling this field will ensure that the runtime-updated token from Rclone will be provisioned to the respective Credential Field on the Universal Controller. The default setting is unchecked. | Introduced in 1.0.0 |
SSL Certificate Verification | Optional | True | Boolean | When this flag is disabled, SSL Verification is skipped when connecting to Universal Controllers using HTTPS, and a CA Bundle is not required. To provide a CA Bundle, consult the SSL Verification section. Optional when Update Credentials is checked. | Introduced in 2.0.0 |
Controller URL | Optional | - | Text | Controller URL where Storage Credentials are stored. Required when Update Credentials is checked. | Introduced in 1.0.0 |
Controller Credentials | Optional | - | Credentials | Controller user's credentials, used for logging and updating Storage Credentials. The Credentials definition should be as follows:
Required when Update Credentials is checked. | Introduced in 1.0.0 |
Refresh Storage Credentials | Optional | - | Array | Note: This Array is not required to be configured if the configuration (storage) is of type "onedrive". This Array field is available when Update Credentials is checked. It is used as a mapping table between the Configuration File locator that Rclone has updated during execution, and its corresponding Universal Controller Credential field.
This option copies the Configuration file's field value to the provided Storage Credential field. Each line of this Array is evaluated, and related mapping is performed. See Refresh Storage Credentials for other remotes.
| Introduced in 1.0.0 |
Monitor Time Interval | Optional | 300 | Integer | The interval period in seconds used to monitor the given Storage Filepath. | Introduced in 1.0.0 |
Use Filter | Optional | -- None -- | Choice | The filter type that is applied to the Action. Available options:
| Introduced in 1.0.0 |
Filter | Optional | - | Text | Filter based on Rclone filtering rules that is applied to the Action. Required when Use Filter is checked. | Introduced in 1.0.0 |
Files Only | Optional | False | Boolean | When enabled, directories will be ignored and only files will be monitored. | Introduced in 1.0.0 |
Use Storage System Modified Time | Optional | True | Boolean | When enabled, the modified time of the | Introduced in 1.0.0 |
Recursion Depth | Optional | 1 | Integer | Recursion depth that is applied. Default value 1 means that no recursion will be applied. | Introduced in 1.0.0 |
Additional Options | Optional | - | Text | Space-separated Rclone options that applied to the selected Action. | Introduced in 1.0.0 |
Event Tag | Optional | - | Text | This field allows task authors to define a 'tag' attribute for the generated universal events, enabling more filtering capabilities at the Universal Monitor level. This field is included as an Event Attribute. | Introduced in 1.0.0. Renamed to Event Tag in 2.0.0 |
This monitor publishes Universal Events when objects are monitored successfully, based on the selected Action. The suggested implementation to accomplish this behavior is to associate a Cloud Data Monitor Task (event publisher) with a Universal Monitor Task (event consumer).
The Universal Event for this Universal Extension is described below.
Attribute | Description | Type |
---|---|---|
Storage System | The Storage System where the monitored object is stored. This is the input field Storage System. | Text |
Storage Filepath | The Storage System where the monitored object is stored. This is the input field Storage Filepath. | Text |
Filename | The name of the monitored object. | Text |
Filesize | The size of the monitored object. | Integer |
File Modified Time | The modification time of the monitored object. | Text |
Event Tag | Allows task authors to define a 'tag' attribute for the generated Universal Events, enabling more filtering capabilities at the Universal Monitor level. This is the Event Tag field. | Text |
Event Type | The name of the Action that initiated the Universal Event. This is the Action field. | Text |
Directory | A flag that is true when the monitored object is a directory. | Boolean |
Agent Name | The name of the agent the task instance is running on. | Text |
Two scenarios of the association between a Cloud Data Monitor Task (event publisher) with a Universal Monitor Task (event consumer) are described below. For both scenarios, a Cloud Data Monitor Task (Publisher) and a Universal Monitor Task (Consumer) should be configured properly.
Workflow Scenario | ![]() |
---|---|
Trigger Scenario | ![]() |
Universal Monitor can be configured in different ways:
Monitor configuration | Description |
---|---|
Universal Monitor is attached to a specific Publisher task | The Cloud Data Monitor Task is automatically started when the related Universal Monitor is started (either standalone or through a trigger). That creates a tight relationship between the Universal Monitor (Consumer) and Cloud Data Monitor Task (publisher) where the events that get published are always processed. This configuration option is the most common one, especially when a monitor is attached to a trigger. |
Universal Monitor is not attached to a specific Publisher task | In this case, the Universal Monitor (Consumer) and the Cloud Data Monitor Task(s) (Publisher) are started separately. The Universal Monitor will be consuming events from any Task Instance of type Cloud Data Monitor. If the monitor is not running while the Cloud Data Monitor Task (Publisher) is emitting events, those events will not be processed. Operationally the Universal Monitor must be running before the related Cloud Data Monitor Task(s) are started. |
In a Universal Monitor Task, the Event Type should always be "Local". The Universal Monitor Criteria of a Universal Monitor Task are the Attributes of the Event Template. |
Within a Workflow, only the Universal Monitor Task is configured and is a direct workflow child. The Cloud Data Monitor Task is directly associated with the Universal Monitor Task but is not in the scope of a Workflow.
Upon a successful monitor, the Monitor will go into Success status and the underlying Cloud Data Monitor will go into Finished status.
This Use Case is when we want to monitor changes continuously and for each event to trigger a task or a workflow.
Name | Type | Description | Version Information |
---|---|---|---|
Total Event Count | Integer | The number of events the task instance has published. | Introduced in 1.0.0 |
Last Event Timestamp | Text | The timestamp (in UTC) of the most recent published event. | Introduced in 1.0.0 |
Environment Variables can be set in the Environment Variables task definition table.
When attempting to Refresh Storage Credentials using HTTPS, it might be necessary to provide a CA Bundle. To do so, set the REQUESTS_CA_BUNDLE environment variable to the path of the desired CA Bundle.
The exit codes for this Universal Extension are described below.
Exit Code | Status | Status Description |
---|---|---|
0 | Success | Task executed successfully. |
1 | Failed | Execution Failed: "<Error Description>" |
20 | Failed | Data Validation Error: "<Error Description>" |
22 | Failed | Execution Failed: Task executed successfully, but updating Credentials failed. |
STDOUT and STDERR provide additional information to the User. The populated content can be changed in future versions of this extension without notice. Backward compatibility is not guaranteed. |
Metrics are generated and exported by this integration, related to the generated Cloud Data Monitor Events.
Name | Instrument Type | Unit (UCUM) | Attributes | Instrumented By | Description |
---|---|---|---|---|---|
ue.cdm.events | Counter | {event} | As defined on Metric Attributes. | Universal Controller (Through Universal Event Templates) | Counts published events. |
The following attributes are applicable for ue.cdm.events
.
Attribute Name | Enabled | Description |
---|---|---|
type | By Default | The selected action name of the Universal Task. |
storage | By Default | The storage system that the Universal Task monitors. |
filepath | By Default | The monitored file path. |
Administrators can update the Universal Event Template to control additional attributes sent out for Universal Event-based Metrics. However, this configuration should be approached with caution. When the possible distinct values of those attributes are high, that might lead to high cardinality issues.
Administrators can activate them with caution as follows:
Go to Administration → Universal Templates.
Select the Universal Template.
Click the “Event Templates” Tab.
Select the Name of the Event Template you want to update, which represents the metric you are interested in.
Update the “Optional Metric Labels” list of required Metric Labels.
A ready-to-use Grafana dashboard can be imported that enables enhanced visibility and understanding of the behavior for Task Instances. It uses the above published metrics.
See the related How To section on how to install it.
To use the Universal Template, you first should perform the following steps.
This Universal Task requires the Resolvable Credentials feature. Check that the Resolvable Credentials Permitted system property has been set to true.
To import the Universal Template into your Controller, follow the instructions from the official documentation: Import An Integration.
When the files have been imported successfully, refresh the Universal Templates list; the Universal Template will appear on the list.
Modifications of this integration, applied by users or customers, before or after import, might affect the supportability of this integration. For more information refer to Integration Modifications.
To configure a new Universal Task, there are three steps required:
This integration depends on the Rclone binary which needs a configuration file to locate the required information for the involved storage system(s). This file is passed from the Universal Controller to the Universal Agent as UAC Script through the Configuration File Input Field. The Universal Controller Script should be of type Data, and option Resolve UAC Variables should be enabled.
Rclone is integrated with multiple storage systems. This Universal Extension has been tested against the following Storage Systems.
This integration should work properly against other Storage Systems, as long as the integration interface (see the Configure Universal Task chapter) and functionalities listed in this document fulfill the needs of the Storage System.
|
The indicative Rclone configuration examples below contain the basic connection parameters.
System | Rclone Configuration Documentation Link | Example | |
---|---|---|---|
AWS S3 | AWS S3 Rclone Configuration Guide |
| |
Google Cloud Storage (Google Drive) | Google Drive Rclone Configuration Guide |
| |
Microsoft OneDrive/Sharepoint (Using Microsoft Graph Delegated Permissions model) | Microsoft OneDrive/Sharepoint Configuration Guide For OneDrive/Sharepoint Monitoring, refer also to the Refresh Storage Credentials section. |
| |
Microsoft OneDrive/Sharepoint (OAuth Client Credential flow, using Microsoft Graph Application Permissions model) | OAuth Client Credential Flow Configuration Guide For OneDrive/Sharepoint Monitoring, refer also to the Refresh Storage Credentials section. |
| |
Local Filesystem | Local Filesystem Configuration Guide |
|
Storage system configuration embodies the related credentials for authentication and authorization. It is advised that account credentials, tokens, or any other essential information inside the Rclone Configuration File be passed as Universal Controller Credentials, through Credential functions to be kept safe.
Task authors should be aware of Credential Attributes length limitations. For example, the 'Runtime Password' attribute of a Universal Controller Credential supports strings with up to 512 characters, so it should not be used to store information larger than this value. |
There are several ways that Credential Functions can be used. To make the Configuration File immune to changes in credential names used in the task definition, it is recommended to follow the Configuration through Credential Field Variables approach. Another benefit of this approach is that it is compatible with all the Universal Controller versions supported by this integration. However, alternative approaches are Configuration through Credential Name and Configuration through Credential as Variable, which rely on changes performed on the Configuration File itself, rather than the task definition. The next chapters provide more information on them.
For local filesystem storage, no credentials are required in the Configuration File. In this case, the credentials that are provided in the Agent Details of the Universal Task are used. If not, the selected action is executed with the permissions of the user that runs the ubroker daemon.
The table below lists the variables that can be used for the respective input Credential Field and an example of a function that can be used in the Configuration File definition.
Field Name | Field Variable | Credential Function Example |
---|---|---|
Storage Credentials | ops_ue_cloud_storage_credentials | ${_credentialUser('${ops_ue_cloud_storage_credentials}')} |
Example of a Configuration File for AWS S3 Storage
[aws_s3] type = s3 provider = AWS access_key_id = ${_credentialUser('${ops_ue_cloud_storage_credentials}')} secret_access_key = ${_credentialPwd('${ops_ue_cloud_storage_credentials}')} region = us-east-2 |
In this case, the Credential Name is used directly inside the Configuration File.
Example of a Configuration File for AWS S3 Storage, using a Credential Function with the Credential Name
[aws_s3] type = s3 provider = AWS access_key_id = ${_credentialUser('ue-aws-s3')} secret_access_key = ${_credentialPwd('ue-aws-s3')} region = us-east-2 |
When using this approach, always have in mind that:
Starting from Universal Controller 7.6, Credentials can be provided as UAC Variables:
The above approach requires no custom changes in the Configuration File contents.
[aws_s3] type = s3 provider = AWS access_key_id = ${_credentialUser('${ops_ue_cloud_storage_credentials}')} secret_access_key = ${_credentialPwd('${ops_ue_cloud_storage_credentials}')} region = us-east-2 |
Remote storages of type Microsoft OneDrive & Sharepoint use an OAuth2 token ({"access_token": ..., "token_type": ... , "refresh_token": ... , "expiry": .... }
) to authorize users or applications. In this case, and only when the access token has expired, Rclone exchanges the existing refresh token
for a new access token
and then establishes a connection with the remote storage. This integration provides the capability to save the new value of the token on the selected Universal Controller Credential, so it can be used and configured as a Credential Function.
This integration provides an automatic update of the token when the identified Storage System is of type "onedrive" and it is enabled, and when the task input fields Update Credentials, Controller URL, Controller Credentials are selected.
An example of such a configuration can be found below:
For more information, refer to OneDrive token refresh. |
Some remote storages might have the functionality of refreshing an authorization field. This integration provides the capability to save the new value of the authorization field on a selected Universal Controller Credential, so it can be used and configured as a Credential Function.
The task input fields related to this configuration are Update Credentials, Controller URL, Controller Credentials, and Refresh Storage Credentials.
An example of such a configuration can be found below:
Users can benefit from a ready-to-use sample dashboard that this downloadable integration offers when observability features are used. It is located under the /observability/grafana/
directory inside the downloadable zip file from the Stonebranch Integration Hub. Administrators should refer to the official Grafana User Guide on how to import a Grafana Dashboard.
Dashboard’s Prometheus data source is configured as a variable and thus needs to be mapped to an existing Data Source configured on the target Grafana instance. |
Modifications applied by users or customers, before or after import, might affect the supportability of this integration. The following modifications are discouraged to retain the support level as applied for this integration.
General Section
Universal Template Details Section
Result Processing Defaults Section
Fields Restriction Section
The setup of the template does not impose any restrictions, however, concerning the "Exit Code Processing Fields" section.
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 the 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 the Server Operation Inspect Universal Events to view all Universal Events in the Controller's event queue. |
Users and customers are encouraged to report defects, or feature requests at Stonebranch Support Desk.
In version 1, only the agent user (the user running the Universal Agent) could run this integration on Linux OS. In version 2.0.0, a workaround is available for Agents running without defect D-13034 resolved (updated prior to December 2024). To allow users other than the agent user to run a Cloud Data Monitor Task, follow these steps:
Identify the Linux Agents on which the Cloud Data Monitor Task needs to run.
Initiate a test Cloud Data Monitor task on the agents identified in step (1), using the agent user (by leaving the Agent Details → Credentials field empty). This task ensures the integration installs correctly on each agent, enabling future tasks to run smoothly under various user accounts.
On version 2.0.0 using Universal Agent versions that have D-13034 resolved, it is possible to execute tasks with any user without issues. |
When upgrading major versions, the following actions should be performed to migrate task definitions properly, due to the breaking changes:
${ops_ue_cloud_<field_name>}.
(the "_dm" part existing on version 1 has been removed)Cloud Data Monitor 1.0.0 | Cloud Data Monitor 2.0.0 | ||
---|---|---|---|
|
|
Cloud Data Monitor 1.0.0 | Cloud Data Monitor 2.0.0 |
---|---|
Event Monitor On Create | Event Monitor |
Event Monitor On Create Exists | |
Event Monitor On Change | |
Event Monitor On Delete |
With this change, Universal Events should be filtered by Action name using the new "event_type" attribute. To see what this looks like, refer to the Universal Monitor Task Example.
This document references the following documents.
Document Link | Description |
---|---|
Universal Templates | User documentation for creating Universal Templates in the Universal Controller user interface. |
Universal Tasks | User documentation for creating Universal Tasks in the Universal Controller user interface. |
Universal Event Templates | User documentation for Universal Event Template fields definition. |
Universal Monitor Tasks | User documentation for creating Universal Monitor Tasks in the Universal Controller user interface. |
Rclone | Rclone official documentation. |
Rclone Storage Systems configuration | Configuration file details. |
Rclone Exit Codes | Rclone exit codes list. |