Skip to main content
Version: Unreleased

Intro

Periodic jobs are scheduled tasks that run at predefined intervals to maintain system operations. Each job has a specific role, execution time, cooldown behavior upon failure, and an associated alert message for failures.

Jobs Overview​

These jobs are grouped into three categories based on their purpose:

System Health Jobs​

These jobs monitor and maintain the health of critical system components. They ensure connectivity, resource availability, and service uptime.

System Health Connectivity​

RoleChecks connectivity with Vector and Elasticsearch
Run TimeRuns every 1 minute
Cooldown in Failure CaseStops sending alerts for 2 hours

Alert Message on Failure examples:

danger

[critical] Vector unreachable (Monitor) Could not reach Vector at 127.0.0.1:5044 or ::1:5044.

System Health Space​

RoleThis periodic job is responsible to check disk space for both Monitor Data and Elasticsearch
Run TimeRuns every 1 minute
Cooldown in Failure CaseStops sending alerts for 2 hours

Options​

You can adjust Data partition and Elasticsearch trigger parameters

Alert Message on Failure examples:

info

[high] Elasticsearch space quota (Monitor)

Free disk space on Elasticsearch node(s) has dropped below 10.00%. The current usage details:

  • Node tXfoBM7sRyi3uuDsoeqBcg: 39.38% used, with 11.83 GiB remaining.

System Health Advanced Alert Engine​

RoleChecks connectivity with Advanced Alert Engine
Run TimeRuns every 1 minute
Cooldown in Failure CaseStops sending alerts for 2 hours

Alert Message on Failure examples​

danger

[critical] Advanced alerts engine unreachable (Monitor) Could not reach Advanced alerts engine at 127.0.0.1:123 or ::1:123.


Events and Data Retention Jobs​

Datastream Retention Job​

RoleRemoves Elasticsearch documents and data stream backing indices older than a configurable retention window
Run TimeRuns every day at midnight

Datastream Retention Options​

You can configure the retention window via the monitor settings or by the EVENTS_CLEANUP_DAYS environment variable (default: 30 days). Setting it to 0 disables the job entirely.

Datastream Retention Flow​

PCAPs Retention Job​

RoleRemoves pcap and call recording files older than a configurable retention window
Run TimeRuns every day at 1 AM

PCAPs Job Options​

You can configure the retention window independently for each catalog item from the monitor settings or by overriding the ENV variables:

  • PCAP_CLEANUP_DAYS — number of days to retain pcap files (default: 30). Set to 0 to skip pcap cleanup.
  • RECORDINGS_CLEANUP_DAYS — number of days to retain call recordings (default: 30). Set to 0 to skip recordings cleanup.
  • RETENTION_MAX_RUN_MINUTES — maximum minutes one run may spend deleting old files before deferring the rest of the backlog to the next run (default: 10).

PCAPs Job Flow​

Low Space Cleanup Job​

RoleFrees disk space by deleting old Elasticsearch events and catalog files when free space drops below configured thresholds
Run TimeRuns every 5 minutes

Low Space Job Options​

Options are configurable on the System Health settings page or by overriding the following ENV variables:

VariableDefaultDescription
EVENTS_CLEANUP_PERCENTAGE20Elasticsearch free-space threshold (%). Cleanup runs while free space is below this. Set to 0 to disable.
DATA_CLEANUP_PERCENTAGE10Monitor-data free-space threshold (%). Cleanup runs while free space is below this. Set to 0 to disable.
EVENTS_CLEANUP_DAYS30Starting retention window used for the first event-cleanup iteration.
info

Event cleanup only runs on single-node Elasticsearch setups. Multi-node clusters are skipped automatically.

Low Space Job Flow​


Generic Jobs​

Peak Calls Job​

RoleComputes and stores the peak concurrent call count per hostname for the current month
Run TimeRuns every day at midnight

Flow​


Manually Dispatching Jobs​

The Jobs API exposes endpoints to list available jobs and manually trigger a specific job.

List Available Jobs​

Retrieve all registered jobs:

curl -k -X GET "https://<ip>/api/jobs" \
-H "Accept: application/json"

Example response​

Returns an object containing arrays of running and stopped job IDs, categorized by their status.

{
"running": [
"peakcalls",
"system-health-connectivity",
"system-health-space",
"system-health-advanced-alert-engine",
"dataStreamsRetention",
"pcapsRetention"
],
"stopped": []
}

Trigger a Job Manually​

Dispatch a specific job by its jobId:

curl -k -X POST "https://<ip>/api/jobs/<jobId>/trigger" \
-H "Accept: */*"

It will respond with 200, which means the job was triggered successfully.

info

You can monitor the job progress by checking the container logs, for example:

[04:56:33.808] INFO (express): Incoming request {"service":"express","path":"/api/jobs/dataStreamsRetention/trigger","method":"POST"}
[04:56:33.942] DEBUG (periodic): ...

API Reference​

Full request/response schemas and authentication details are available in Swagger:

Swagger jobs documentation