Inventory and changes
The current state Structam keeps for each host, every change event kind with its category and severity, review, change rules and the per-host hash chain.
On this page
Structam keeps the current state of every host and records every difference between two observations as a change event. It does not keep a history of inventory rows: when an application is removed its row goes, and the removal is a change event. History lives in the change record and, for configuration files, in configuration history.
Current state
| Host tab | What it holds |
|---|---|
| Applications | name, version, architecture, source, install path, vendor, running state |
| Executables | path, SHA-256, size, owner, mode, hash state, the application that owns it |
| Processes | executable, user, service, container, instance count |
| Services | systemd units, launchd jobs or Windows services with their state |
| Ports | listening protocol, address and port with the owning process |
| Accounts | local users and groups, with administrator membership |
| Components | hardware from the agent, and from InfraDB when linked (kept apart by source) |
| Patches | Windows KBs and macOS OS updates (not collected on Linux) |
| Facts | OS, kernel, CPU, memory, serial, boot time, addresses |
- Application sources:
dpkg,rpm,apk,pacman,snap,flatpak,pkgutil,app,brew,msi,registry,appx, andbinary(standalone running executables no package owns). - Several installed versions of one name (kernels, side-by-side MSI or Appx, Homebrew kegs) are separate rows.
- An application is running when a running process's executable belongs to it. A running image that differs from the file on disk is flagged.
- Executable hashes are SHA-256. Hash states:
ok,pending(over the per-pass hashing budget),too_large,unreadable. - Processes are grouped: identical executable, user, service and container are reported once with an instance count, so process ids are not kept. Container processes are recorded with their container id but never become applications.
- Freshness is tracked per host and section, not per row.
The first inventory of a host is a baseline: its current state is written and one inventory.baseline event records the counts, with no event per item.
Change event kinds
Every change event has a kind, a category and a default severity (info, low, medium or high). Change rules may set another severity.
| Kind | Category | Severity |
|---|---|---|
app.installed, app.removed, app.version_changed | software | medium |
app.path_changed | software | low |
binary.hash_changed (same path, same package version) | software | high |
binary.added, binary.removed (standalone binaries) | software | medium |
patch.installed, patch.removed | software | low |
app.started, app.stopped | runtime | info |
service.added, service.removed, service.state_changed | runtime | low |
port.opened, port.closed | network | medium |
config.created, config.modified, config.deleted | config | medium |
config.metadata_changed (mode, owner, group) | config | medium |
config.redaction_changed (only the redaction rules changed; no review needed) | config | info |
account.added, account.removed, account.changed | account | medium |
account.admin_granted | account | high |
facts.changed (one event per group: OS, kernel, CPU, memory, serial, addresses) | system | low; OS and kernel medium |
hardware.added, hardware.removed, hardware.changed (serial or firmware) | hardware | medium |
agent.enrolled, agent.revoked, agent.updated, agent.gap, agent.reenrolled | agent | medium |
agent.clone_suspected | agent | high |
inventory.baseline | system | info |
host.identity_changed (NetBox name, site, tenant, role, status, tags, primary IP) | identity | low; status medium |
asset.changed (asset details edited in Structam) | identity | low |
host.merged, host.decommissioned | system | low |
infradb.<entity>.<action> (host changes from InfraDB's audit sink) | external | as sent; review not required |
Notes on a few of them:
app.version_changedpairs a removed and an added row of the same product in one diff, so an upgrade is one event, not a removal and an installation.binary.hash_changedfires when an executable's SHA-256 changes while its owning application keeps its version: a file replaced behind the package manager's back. The first hash of a file is not a change, and a pass that cannot hash a file does not hide a replacement.agent.gapmeans the agent's on-disk queue dropped messages before the server received them.
Review
Every event starts as pending unless a rule decides otherwise. Review states: pending, approved, rejected, auto_approved, not_required. Approve, reject, comment and bulk review by filter need changes.review within your scope, and are audited. The Changes page lists events in your scope, newest first and waiting for review by default, and filters by host, kind, category, severity, review state, time and text.
Change rules
Change rules (Policies, policies.manage) match events and act on them.
- Match on kinds, categories, severities, host attributes (sites, tenants, roles, tags, platforms) and a subject glob. Lists match when any entry matches; fields match when all do.
- Actions:
auto_approve,not_required,set_severity,raise_infradb_alarm(an alarm in InfraDB until the change is approved) andnotify_siem(marks the event for the SIEM forwarder). - Per action, the highest priority wins.
- Built-in rules, editable and can be turned off: the
runtimecategory isnot_required;agent.updatedisauto_approve.
The per-host hash chain
Each change event is written in the same transaction as the state it describes, and chained per host: its hash is SHA-256 over the previous event's hash and the canonical JSON of the event's stored fields. Review fields are not hashed, because they change by design. Verify a host's chain, including hosts merged into it:
structam audit verify -host 42or GET /api/v1/hosts/{id}/changes/verify (permission audit.view).
Retention
STRUCTAM_CHANGE_RETENTION_DAYS (0, the default, keeps everything) drops whole monthly partitions, never before every enabled SIEM sink has received them. Before a partition is dropped, each host's chain gets an anchor, so it stays verifiable from there.
Questions the docs do not answer?
Ask the people who build Structam. Installation media and licences come from KazLabs.