Sync task reference

Every element and attribute of a Flux sync task: the XML file (repository, checksum, nodes, accounts, directories, proxies, performance and notification tags), the Data Sync console fields and the task actions.

What you will do: write or read a task XML with every option in front of you, and know what each console action does.

A task is an XML file on the hub that the Data Sync console runs on a schedule. The console holds the name, description, the absolute Path to the file and the schedule; everything else is in the XML. Flux walks through a first task; this page is the reference.

Console

Flux > Data > Data Sync: New Task (name, description, path, schedule), then per task Execute (run now), Edit, Duplicate, Delete, Force Log Sync (All) (re-sync files deleted from the repository that still exist at the source, on the next run) and Force Log Sync (Checksum mismatch) (re-sync only files whose checksum differs, on the next run).

Structure

<SyncLogsConfiguration>
  <SyncLogsRepository repositoryDirectory="/mnt/FluxRepo/" timeToKeep="30" />
  <Checksum interval="30m" algorithm="MD5" mailRecipients="ops@example.com" enabled="true" retryAttempts="3" />
  <ProxyRemote> … </ProxyRemote>                      <!-- optional, global or per node -->
  <NotificationsService …> … </NotificationsService>  <!-- optional -->
  <SyncLogsNode repositoryDirectory="data-server-1" key="…" multiReaders="true" numberOfReaders="10">
    <Remote>
      <Account classKey="xpolog.eye.media.remote.RemoteXplgAccount" name="data-server-1"/>
    </Remote>
    <SyncLogsDirectory syncDirectory="/opt/app1/data/" repositoryDirectory="logs"
                       filesToInclude="*.log,*.zip" filesToExclude="*.gz" subdirsScanLevel="10"
                       timeInterval="1" timeIntervalUnit="days" markCompletedTime="10000" />
  </SyncLogsNode>
</SyncLogsConfiguration>

Elements and attributes

Element and attributeRequiredMeaningValues and default
SyncLogsRepository repositoryDirectoryyesroot directory of the repositoryabsolute path
SyncLogsRepository timeToKeepnodays to retain synced datanumber
Checksum algorithmyes when presentchecksum algorithmMD5, SHA-1
Checksum enablednoactivates validationtrue / false
Checksum intervalyes when presenthow often checksums are calculated30m, 2h, 1d
Checksum retryAttemptsyes when presentretries before alertingnumber
Checksum mailRecipientsnoalert recipientssemicolon-separated
SyncLogsNode repositoryDirectoryyesdirectory inside the repository for this nodestring
SyncLogsNode keynounique node keystring
SyncLogsNode multiReaders, numberOfReaders, maxQueueSize, dataBlocksSizenoparallel sync; see Performance tuningfalse, -1, 52428800, 1048576
Remote > Account classKeyyesaccount classxpolog.eye.media.remote.RemoteXplgAccount
Remote > Account nameyesthe Remote XpoLog account on the hub (the Flux pages call it the Remote Flux/PortX account)string, case-sensitive
ProxyRemote > Account …noproxy instances; global outside a node, or inside one nodeas above
SyncLogsDirectory syncDirectoryyessource directory on the agentpath
SyncLogsDirectory repositoryDirectorynosubdirectory inside the node's repository directorystring
directoriesToInclude, directoriesToExcludenodirectory filters, wildcards (Apps*) or regex; exclusions in lower casestring
filesToInclude, filesToExcludenofile filters, wildcards (*.log) or regexstring
subdirsScanLevelnodepth of sub-folder scanningnumber
timeInterval, timeIntervalUnitnoonly files updated within the intervalnumber; years, months, weeks, days, hours, mins
markCompletedTimewith notificationsmilliseconds after which a sync cycle counts as completenumber, for example 10000

A <Checksum> can sit at the configuration level or inside a <SyncLogsNode>; checksums on large files cost performance.

Notifications

<NotificationsService failureNumberOfRetries="2" failureRetriesTime="-1" failureNotificationKeepSendTime="100000">
  <Notifications supportedTypes="FILE_COMPLETED" sendForEach="true" sendInBackground="false" sendAtEnd="false">
    <Tasks>
      <xpoTask exePath="cmd /c echo [NOTIFICATION_TIME] [FILE_NOTIFICATION_TYPE] >> log.txt" name="Log Notification" />
      <xpoTask MailAccountToId="ops@example.com" MailSubject="Flux Alert" classKey="xpolog.eye.automation.tasks.mail.MailTask" name="Email Notification" />
      <xpoTask classKey="xpolog.eye.automation.tasks.restapi.RestApiTask" method="POST" url="https://<xplg-host>/logeye/api/logger.jsp?token=<token>" name="API Notification">
        <Param key="data" value="{&quot;a&quot;:&quot;b&quot;}"/>
      </xpoTask>
    </Tasks>
  </Notifications>
  <Notifications supportedTypes="FILE_READ_FAILURE,FILE_WRITE_FAILURE,TASK_FAILED" sendForEach="true" sendInBackground="false" sendAtEnd="false">
    <Tasks> … </Tasks>
  </Notifications>
</NotificationsService>
AttributeMeaningDefault
NotificationsService failureNumberOfRetriesfailures before an alert; -1 disables the check3
NotificationsService failureRetriesTimemilliseconds from first to last failure, per the retry count, before alerting-1
NotificationsService failureNotificationKeepSendTimemilliseconds to wait before alerting again while the issue persists-1 (every failure)
Notifications supportedTypesFILE_COMPLETED, FILE_DELETE, FILE_READ_FAILURE, FILE_WRITE_FAILURE, TASK_FAILED, comma-separatedFILE_COMPLETED
Notifications sendForEachone alert per notification (true) or one global alertfalse
Notifications sendInBackgroundsend asynchronouslyfalse
Notifications sendAtEndsend at the end of the task; the wiki says it is required when sendForEach is true, yet its own example (above) sets it falsetrue
xpoTaska script (exePath), an email (MailTask, MailAccountToId, MailSubject) or a REST call (RestApiTask, method, url, Param)

Placeholders [NOTIFICATION_TIME] and [FILE_NOTIFICATION_TYPE] are available in script commands. Every SyncLogsDirectory needs markCompletedTime when notifications are used.

Checks

  • The account names in the XML match the hub's Remote accounts exactly.
  • repositoryDirectory paths exist and have space for timeToKeep days of data.
  • Run once with Execute and read metricevent.log for event.data-sync.end; see Performance tuning.

Next: Performance tuning

Source: XPLG wiki, pages 2199191556, 2198994949, 2199224325, 2199093250 (https://xpolog.atlassian.net/wiki/spaces/XPOL/pages/2199191556).

XPLGXPLG
Docs

Search documentation

Search through help articles and documentation

    • Introduction
    • Create your account and workspace
    • Your first deployment in 10 minutes
    • Configure after installation
    • Register a deployment
    • Get an evaluation license
    • Next steps
    • Glossary
Back to XPLG Dock