Skip to main content

Lattice recurring data job health alerts

What it does. Evaluates the health of every recurring data job (Broken, Failing, Warning, Healthy or Inactive) from its batch jobs, client applications, mappings and messages, and raises the Recurring data job health changed business event for each job with alerts switched on whose health changed. Runs: automatically every 15 minutes as a background process. Who looks after it: Integration administrator (the health thresholds and alerts of each job); Integration operator (watching the health, and the thresholds over OData); System administrator (the background process itself, on a standard page).

Purpose​

A recurring data job can stop without anyone noticing: its batch job is put on hold, its client application is disabled, its mapping breaks, or the partner simply stops sending files. Data management keeps accepting or ignoring messages and raises no alarm. This process checks every job on a schedule, writes the result where the Recurring integration health page and the Integration operations workspace tiles read it, and sends a business event when a job's health changes, so a monitoring tool or an on-call team hears about it.

Without it, the health page and the tiles show only the last evaluation someone started by hand, and no health changed event is ever sent by the schedule.

When it runs​

  • Every 15 minutes. It is one process for the whole environment: recurring data jobs are shared by every legal entity.
  • The database synchronization of a Lattice deployment registers it, and process automation must be initialized in the environment. There is no batch job for you to create.
  • A poll creates a batch job named Lattice recurring data job health alerts only when there is a recurring data job to evaluate, or a health row of a deleted job to remove. Otherwise nothing runs.
  • The same evaluation also runs when you choose Refresh health or Refresh all on Recurring integration health, when you save a job's thresholds, when you open Recurring integration health and a job has not been evaluated yet, and when a caller uses the Refresh or RefreshAll action of LatticeRecurringJobHealths. Each of these follows the same alert rules.

Configuration and scheduling​

SettingWhereDefault
How often it runsSystem administration > Setup > Process automations, Background processes tab: select Lattice recurring data job health alerts and choose Edit, then Repeat interval on the Execution parameters tabEvery 15 minutes
A time of day when it does not runThe same dialog, Sleep time period groupNot set by Lattice
Thresholds and alerts of one jobRecurring integration health: select the job and open Recurring integration details, Health thresholds tab (also LatticeRecurringJobHealths)See below
Whether the event is sentSystem administration > Setup > Business events > Business events catalog: activate Recurring data job health changed (category System administration) in the legal entity of the job's processing batch jobNot activated

The thresholds, per job:

FieldWhat it controls0 means
Failure window (hours)How far back failed and partially processed messages are counted24 hours
Backlog age (minutes)How long the oldest waiting message may wait before a warningThree recurrence intervals of the job, and at least 15 minutes
Silence period (minutes)How long an active job may go without a new message before a warningThe silence check is off
Stuck after (minutes)How long a message may stay in processing before a warning60 minutes
Failure thresholdHow many failed messages make the job Failing, and how many partially processed messages give a warning1
Alerts enabledWhether a change of this job's health raises the business eventOff (the default for every job)
  • The Values in use group on the same tab shows the values the evaluation actually uses, with the defaults filled in.
  • A negative value is refused: "Health thresholds cannot be negative. Enter 0 to use the default." Saving the thresholds evaluates the job again at once.
  • Only the Integration administrator role can change the thresholds, on the page or through LatticeRecurringJobHealths (keyed by JobName; the writable members are WindowHours, BacklogAgeMinutes, SilenceMinutes, StuckMinutes, FailureThreshold and AlertsEnabled). The Integration operator role reads them only.
  • A deployment keeps the interval, next execution and owner you set. The process cannot be switched off; to keep it out of busy hours, set Enabled sleep period or Next execution in Edit.
  • Process automations is a standard page that only the System administrator role opens.

How it works​

  1. List the jobs. The run reads which jobs have been evaluated before (their next change counts as a real change), then evaluates every recurring data job, one job at a time, each in its own small transaction.
  2. Check an active job for faults that stop it (Broken).
    • It has no batch jobs: "The job is active, but it has no batch jobs."
    • Its processing or monitoring batch job no longer exists, or has status Withhold, Error, Ended, Canceling or Canceled.
    • It is an import job and no client application is enabled to submit to it.
    • The mapping validation finds errors on its data project (a data project that does not exist counts as one error).
  3. Count failures (Failing). For an active job, messages with status Processed with error, Pre-processing failed or Post processing failed that finished within the failure window. The job is Failing when there are at least as many as the failure threshold.
  4. Look for warnings (Warning).
    • Backlog: for an import job, messages that are Queued; for an export job, exported messages not yet acknowledged (Processed with a file, Dequeued or Downloaded). An active job warns when the oldest has waited longer than the backlog age; an inactive job warns as soon as anything is waiting, because nothing will process it.
    • Partially processed: messages Processed within the failure window although some rows failed in staging or in the target, at least as many as the failure threshold.
    • Stuck: messages In process or Pre-processing for longer than Stuck after (minutes).
    • Silence (only when a silence period is set): no new message for longer than the silence period. A job that has never had a message is measured from when it was first scheduled.
  5. Set the health. The job takes the worst state of all its reasons. With no reason, an active job is Healthy and an inactive one Inactive. The reasons, the signal values and the time of the evaluation are saved on the job's health row, and Health changed and Previous health are updated when the state differs from the last one.
  6. Raise the event. For each job whose state changed, has Alerts enabled set and had been evaluated before, the run raises Recurring data job health changed in the legal entity of the job's processing batch job (or the current legal entity when it has none), if the event is activated there.
  7. Tidy up and report. Health rows of jobs that no longer exist are deleted, and the run ends with "Recurring data job health evaluated: %1 jobs changed state, %2 health alerts raised.", with the numbers in place of %1 and %2.

The event is sent once per change. A job that stays Broken is reported once, when it became Broken, and again only when its health changes. A job's first evaluation sets its starting point and raises nothing, and switching Alerts enabled on raises nothing until the next change.

Before it can run​

  • Process automation is initialized in the environment (System administration > Setup > Initialize process automations), Lattice was deployed with a database synchronization, which registers the process (a synchronization from Visual Studio registers nothing), and the batch service is running.
  • At least one recurring data job.
  • For alerts: Alerts enabled on the job, the business events framework set up with an endpoint, and Recurring data job health changed activated in the legal entity of the job's processing batch job. See Activating an event and sending it somewhere.
  • A license warning or block does not stop it.

Inputs and outputs​

WhatWhere you see it
ReadsRecurring data jobs, their batch jobs, client applications, data project mappings and messagesRecurring integration details; the standard data management pages
ReadsEach job's thresholdsRecurring integration details, Health thresholds tab
WritesOne health row per job: Health, Previous health, Health changed, Evaluated, Reasons and the signals (Waiting messages, Oldest waiting since, Failed messages, Partially processed messages, Stuck messages, Last message, Enabled clients, Mapping errors, the batch job statuses)Recurring integration health; the Recurring jobs failing or broken, Recurring jobs with a backlog and Silent recurring jobs tiles; LatticeRecurringJobHealths
DeletesHealth rows of deleted jobs
SendsRecurring data job health changedThe endpoint the event is activated for; payload on the event page

It changes no recurring data job: it never activates, repairs or deactivates one. Those are the Activate, Repair and Deactivate buttons on Recurring integration health.

Monitoring and logs​

  • System administration > Inquiries > Lattice > Integration operations > Recurring integration health: Evaluated shows when each job was last checked. If it is more than about 15 minutes old for every job, the process is not running. Select Needs attention only for the jobs in Warning, Failing or Broken.
  • System administration > Setup > Process automations, Background processes tab: select the process and choose View most recent results. Each run shows "Lattice recurring data job health alerts finished.", or "Lattice recurring data job health alerts failed. The messages below give the reason; the process runs again at its next interval." with the messages.
  • System administration > Inquiries > Batch jobs: the batch job named Lattice recurring data job health alerts, whose log holds the run's counts and any warning.
  • The events themselves at your endpoint. This event is not written to the Lattice Business event log, so the business event reconciliation does not resend it.

When it fails​

A job that cannot be evaluated is skipped with a warning and the others are still evaluated; it is tried again on the next run. An event that cannot be sent is reported as a warning and is not sent again: the health row already holds the new state, so the next run sees no change. Because these are handled inside the job, View most recent results still records the run as finished; read the batch job's log.

SymptomCauseFix
"The health of recurring data job '...' could not be evaluated."An error while reading that job's batch jobs, messages or mappingsRead the messages around it in the batch job's log; the next run tries again
"The health alert for recurring data job ... could not be raised."Sending to the endpoint failedFix the endpoint. That change is not sent again: check the job's current Health on the page
A job changed health but no event arrivedAlerts enabled is off, it was the job's first evaluation, the event is not activated in the legal entity of the job's processing batch job, or the process is not runningSwitch alerts on, activate the event in that legal entity, check the process
Evaluated is old for every jobThe process is not running (process automation not initialized, Lattice deployed without the database synchronization that registers its processes, or the batch service stopped)Initialize process automation, deploy Lattice again through your build so the database synchronization runs, or start the batch service; meanwhile choose Refresh all
A job stays Failing after the cause was fixedFailed messages still fall inside the failure windowExpected: it turns Healthy once they are older than Failure window (hours)
"Health thresholds cannot be negative. Enter 0 to use the default."A negative threshold was enteredEnter 0 or a positive value
"The health of recurring data job '...' cannot be deleted. It is kept up to date for every job and removed when the job is deleted."Someone tried to delete a health rowExpected: delete the recurring data job instead, and the next run removes its row

Effect on the rest of Lattice​

  • Recurring integration health, its details page and the three workspace tiles read the saved health. When the process does not run they show the last evaluation, however old.
  • The health is evaluated, and the event raised, by whichever comes first: this process or a refresh from a page or the entity. A change seen by a refresh is not reported again by the next run.
  • Every run validates the mappings of each active job's data project once, and counts messages per job. With many recurring data jobs this adds load every 15 minutes; a longer Repeat interval reduces it, at the cost of later alerts.
  • A job's health and its alert follow the job, not a legal entity: the event goes to the legal entity of the job's processing batch job.