AsterionDocumentation v0.4.1

Test plans and runs

Tables of the area Test plans and runs and their relations
Test plans and runs: tables and foreign keys. Dashed lines lead to tables of other areas.

test_plans

One check with its options (parameters, minimum intervals, managed flag of automatic plans), enabled flag and a version that changes with every edit.

11 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
tenant_idbigint(20) unsignedtenants on delete cascade
namevarchar(255)
descriptiontextyes
enabledtinyint(1)1
checkslongtext
optionslongtextyes
versionint(10) unsigned1
alerted_attimestampyes
created_attimestampyes
updated_attimestampyes

Indexes: tenant_id

test_plan_items

What a plan runs on: a target, a host or a group.

5 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
test_plan_idbigint(20) unsignedtest_plans on delete cascade
target_idbigint(20) unsignedyestargets on delete cascade
group_idbigint(20) unsignedyesgroups on delete cascade
host_idbigint(20) unsignedyeshosts on delete cascade

Indexes: group_id · host_id · target_id · test_plan_id

schedules

When a plan runs: interval (minutes, anchor, optional weekdays and time window), daily at a time on weekdays, or once at a moment. With timezone.

14 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
test_plan_idbigint(20) unsignedtest_plans on delete cascade
typevarchar(16)
interval_minutesint(10) unsignedyes
time_of_dayvarchar(5)yes
weekdayslongtextyes
window_startvarchar(5)yes
window_endvarchar(5)yes
run_attimestampyes
timezonevarchar(255)UTC
anchor_attimestampyes
enabledtinyint(1)1
created_attimestampyes
updated_attimestampyes

Indexes: test_plan_id

scan_runs

One execution of a plan on one satellite (scheduled) or one immediate job (oneshot): status, checks, targets, summary, error, timings.

21 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
uuid uniqueuuid
tenant_idbigint(20) unsignedtenants on delete cascade
test_plan_idbigint(20) unsignedyestest_plans on delete set null
schedule_idbigint(20) unsignedyesschedules on delete set null
satellite_idbigint(20) unsignedsatellites on delete cascade
kindvarchar(16)
run_key uniquevarchar(255)yes
statusvarchar(16)queued
checkslongtextyes
targetslongtextyes
optionslongtextyes
summarylongtextyes
errortextyes
requested_bybigint(20) unsignedyesusers on delete set null
scheduled_fortimestampyes
dispatched_attimestampyes
started_attimestampyes
finished_attimestampyes
created_attimestampyes
updated_attimestampyes

Indexes: requested_by · run_key (unique) · satellite_id · schedule_id · tenant_id, created_at · test_plan_id, satellite_id, finished_at · uuid (unique)

scan_run_items

Live progress of a run: one row per target and task, so the run page shows what is done.

10 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
scan_run_idbigint(20) unsignedscan_runs on delete cascade
item_keyvarchar(191)
targetvarchar(255)
taskvarchar(64)
statusvarchar(16)
detailvarchar(500)yes
started_attimestampyes
finished_attimestampyes
updated_attimestampyes

Indexes: scan_run_id, item_key (unique)

scan_run_steps

Commands a satellite ran in debug mode, with exit code and output (up to 64 KiB each).

9 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
scan_run_idbigint(20) unsignedscan_runs on delete cascade
uidvarchar(16)
commandtext
exit_codeint(11)yes
duration_msint(10) unsignedyes
stdoutlongtextyes
stderrlongtextyes
created_attimestampcurrent_timestamp()

Indexes: scan_run_id, uid (unique)

scan_results

Validated result of one check on one target in a run: status, structured data and optional raw output (nmap XML, …). Pruned with their run after POLARIS_RETENTION_RESULTS days.

12 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
scan_run_idbigint(20) unsignedscan_runs on delete cascade
uidvarchar(16)yes
satellite_idbigint(20) unsignedsatellites on delete cascade
host_idbigint(20) unsignedyeshosts on delete set null
targetvarchar(255)
check_typevarchar(16)
statusvarchar(16)
duration_msint(10) unsignedyes
datalongtextyes
rawlongtextyes
created_attimestampcurrent_timestamp()

Indexes: host_id, check_type, created_at · satellite_id · scan_run_id, uid