Version

    Howtos

    Create a file event listener listening to changes on local file system

    Use SSH public key authentication with SFTP listener

    Observe file from one Cluster node

    Quickly enable or disable file event listener

    Create a file event listener listening to changes on local file system

    This guide shows a way to create a new listener checking appearance of a file (new_invoices.txt) on a local file system (/mnt/sdb2/). The appearance will trigger a graph (graph/checkInvoices.grf) from the InvoicesProcessing sandbox.

    In Event Listeners, click New Listener and select File Listener.

    Enter the Name of the listener, e.g. Invoices.

    Enter the Path to the directory where files will appear: /mnt/sdb2. You can check that CloverDX can access this directory (the directory exists and permissions are set up properly) with the Validate Accessibility button.

    If the observed directory becomes inaccessible, CloverDX Server can send you an email. To do so, tick Send email on check failure and enter recipient(s).

    The event should be triggered on file appearance - set Type of check to File added.

    Enter the file name new_invoices.txt to Filename pattern. Alternatively, leave the field empty to observe all files and directories.

    If the file is created empty, but the content is written after some time, tick Ignore empty files. Doing so, the task will be executed after the file contains some data.

    If it takes a long time to copy the whole file to the observed position, the CloverDX Server can perform several check to ensure that the file to process is not to be changed. Tick Trigger task when file has not changed for and enter the number of checks. If you tick Ignore empty files, this checks will be performed after the file is not empty.

    Choose Sandbox with the graph (InvoicesProcessing) and the graph (graph/checkInvoices.grf).

    To save the changes, click on the Create button.

    Use SSH public key authentication with SFTP listener

    Key-based authentication can be achieved using the openssh.config.file configuration property.

    This sets a path to a SSH client configuration file, in which you can set the individual SSH client options. For the purpose of this example, namely the IdentityFile option.

    Create the SSH client configuration file, e.g.:

    Host sftp.example.com
        Port 9022
        User example
        IdentityFile /home/example/.ssh/id_rsa

    Use the private key file, which will be used to authenticate on the SFTP server.

    Configure the Server property to point to this configuration file location, e.g.:

    openssh.config.file=/home/example/.ssh/config

    Create the File Event Listener as usual, select File system SFTP (SSH/FTP), fill in fields Host, Port, Username and Path. Connection can now be validated using Validate Accessibility button.

    You need to enter values for hostname, port or username in the listener form, even if they are specified
    in the SSH client configuration file.

    Configure the rest of the listener as needed.

    Observe file from one Cluster node

    Create the listener in the same way as on the Server.

    Switch Initialize by to One of selected nodes.

    Add the particular node(s) from Available nodes to Selected nodes.

    Quickly enable or disable file event listener

    In Event Listeners  File Event Listeners, there is a table with event listeners. In this table, click the icon in the Enabled column.

    Pasting URL

    The whole URL including user name and password can be pasted at once. Click Paste URL and paste the string.

    If the name or password in URL contain special characters, e.g. +, the special characters should be encoded: ftp://anonymous:test%2B@example.com/dir/file.txt

    Note: use encoding accepted by the java.net.URLDecoder.decode() function.