Integrations

Built to sit beside what you already run

NetBox owns identity, InfraDB owns monitoring, Structam owns what is installed and configured on each host and how it changed. Each integration below says what crosses, in which direction, and how it was tested.

Source of truth

NetBox

Structam reads devices and virtual machines from NetBox 3.7 to 4.7 and never invents a host identity. It writes back only to its own structam_* custom fields, and only when you turn write-back on.

Source-of-truth rules

  • An agent on a host NetBox does not know appears as unmatched until NetBox has it.
  • A field NetBox did not send keeps its value; a field NetBox sends empty clears it, so a removed tag stops granting scoped access.
  • A change to name, site, tenant, role, status, tags or primary IP is recorded as a host.identity_changed change event.
  • Hosts are never deleted. A host NetBox no longer returns, or marks decommissioning, becomes decommissioned. A run that saw no host, or would decommission more than half of 10 or more managed hosts, refuses to prune.

Sync

WhatWhenDoes
Full syncevery 15 minevery device and VM with interfaces, addresses, sites, tenants, platforms, roles, clusters and tags; prune; drift
Pollevery 60 sobjects changed since the last poll
Webhooksas NetBox sends them"re-read object N" hints, drained every 2 s

Webhooks arrive at POST /api/v1/ingest/netbox, are verified with HMAC-SHA512 over the raw body (X-Hook-Signature) before the body is read, and are limited to 4 MiB. A webhook body is never trusted: the object is re-read with Structam's own token.

Matching agents to hosts

Strongest first; if two rules point at different hosts, or one rule matches several, nothing binds and the agent waits under Agents → Unmatched:

  1. the join token's bound host;
  2. the custom field structam_agent_id;
  3. the DMI serial number (placeholder serials do not count);
  4. an interface IP address;
  5. an interface MAC address;
  6. name, FQDN or short name.

Write-back

Off by default. With a separate write token, Structam keeps structam_agent_id, structam_agent (online, offline, never, revoked), structam_last_seen, structam_url, structam_os and structam_pending_changes up to date, in bulk requests of up to 100 objects every 60 s, and only on state transitions. Optionally, approved and rejected high-severity changes become journal entries.

Drift

Each full sync recomputes agent.hostname_mismatch, agent.ip_not_in_netbox, agent.serial_mismatch, agent.platform_mismatch, agent.duplicate_claim and host.no_agent; discovery adds ip.not_in_netbox.

Configuration (environment, or Integrations → NetBox)

STRUCTAM_NETBOX_URL=https://netbox.example.net
STRUCTAM_NETBOX_TOKEN_FILE=/etc/structam/secrets/netbox_token
STRUCTAM_NETBOX_WEBHOOK_SECRET_FILE=/etc/structam/secrets/netbox_webhook_secret
STRUCTAM_NETBOX_DEVICE_FILTER=status=active
STRUCTAM_NETBOX_WRITEBACK=on
STRUCTAM_NETBOX_WRITE_TOKEN_FILE=/etc/structam/secrets/netbox_write_token
structam netbox test                # both tokens, the NetBox version, rq-workers
structam netbox bootstrap -webhook  # custom fields, the webhook and its event rule
structam netbox sync                # a full sync now
Monitoring

InfraDB

Structam links its hosts to the same hosts in InfraDB, KazLabs' monitoring platform, and passes a few things across. It never creates a host on either side.

Linking

Every 5 minutes each Structam host is linked to at most one InfraDB host: by NetBox device id first, otherwise by a unique host name, then FQDN, then IP address.

What crosses

DirectionWhat
InfraDB → StructamHardware components and firmware (CPU, GPU, memory, disks, NICs, controllers, power supplies, BIOS, BMC firmware) as host components with source infradb, kept apart from the agent's
InfraDB → StructamAn InfraDB panel on the host page: monitoring state, active alarms and availability, cached 30 s per host, with links into InfraDB
Structam → InfraDBAlarms with source: "structam" for change rules with raise_infradb_alarm and for agents offline more than 10 minutes, cleared when the change is approved or the agent is back
Structam → InfraDBOptional: a "Structam" link and config_backup_url on linked InfraDB hosts
InfraDB → StructamInfraDB's audit sink posts host changes to POST /api/v1/ingest/infradb-audit; they appear as external events on the host's timeline
Structam → PrometheusGET /metrics/federate: five agent-health series per host, labelled mc_host for InfraDB's Prometheus federation

Alarms are kept in an outbox written in the same transaction as their cause, posted in batches of up to 1 000, and re-sent every 15 minutes while active. Change severities map high to major, medium to minor and low to warning.

On the InfraDB server

mc token create -name structam -role viewer -scopes ingest

On Structam (environment, or Integrations → InfraDB)

STRUCTAM_INFRADB_URL=https://infradb.example.net
STRUCTAM_INFRADB_TOKEN_FILE=/etc/structam/secrets/infradb_token
STRUCTAM_INFRADB_ALARMS=on
STRUCTAM_INFRADB_ENRICH=on
STRUCTAM_INFRADB_LINKS=off

A token for InfraDB's audit sink

structam user create -username infradb -service
structam token create -name infradb-audit -owner infradb -scopes ingest
Security operations

SIEM forwarding

Sinks forward the audit log, change events or both, in commit order, at least once, in the formats below.

Transports and formats

KindTransportFormats
syslogUDP; TCP with LF or octet-counting framing; TLS (RFC 5425) with an optional client certificate. Header RFC 5424 or RFC 3164.rfc5424-json, cef (CEF:0, vendor KazLabs, product Structam), leef (LEEF 2.0)
httpHTTPS with no auth, bearer, basic, a custom header or an Elasticsearch API key (Splunk HEC uses its own token scheme); optional mutual TLS; no redirectsjson, ndjson, splunk_hec, elastic_bulk (ECS), ocsf
taxiiTAXII 2.1 push to a remote collectionSTIX 2.1

Streams, filters and delivery

  • Two streams, audit and changes, filtered by action, kind, category and minimum severity. Signed audit checkpoints, and change events of a notify_siem change rule, pass every filter.
  • A new sink starts from now, the last 24 hours, the last 7 days or everything, so a new SIEM is not flooded.
  • Each sink keeps a cursor per stream that advances only after the sink accepted the batch. Every record carries a stable event id (UUIDv5) for de-duplication.
  • Failures back off per sink from 1 s to 5 min; HTTP 413 halves the batch; content refusals (a mapping error, an event refused for its content) are recorded and skipped.
  • RFC 5424 structured data uses your IANA Private Enterprise Number (STRUCTAM_SYSLOG_PEN) or the sink's own SD-ID.

A sink, as created through POST /api/v1/audit-sinks (or on Integrations → SIEM and TAXII)

{
  "name": "soc-syslog",
  "kind": "syslog",
  "streams": ["audit", "changes"],
  "filter": {"min_severity": "medium"},
  "config": {"address": "siem.example.net:6514", "transport": "tls",
             "header": "rfc5424", "format": "cef"},
  "start": "24h"
}
Threat intelligence

TAXII 2.1

A read-only TAXII 2.1 server at /taxii2/structam/, and push to a remote collection through a taxii sink.

Collections

CollectionNeedsPublishes
inventoryview, filtered by host scopehosts as infrastructure, applications as software, executables as file with SHA-256
changesview, filtered by host scopechange events as note
auditaudit.viewaudit events as observed-data
  • Clients authenticate with an API token of scope taxii, as a bearer token or as the password of HTTP Basic.
  • Filters added_after, limit (at most 1 000), next and match[type|id|version|spec_version]. date_added rises strictly per collection, so a client resuming from X-TAXII-Date-Added-Last misses nothing.
  • Objects are created by the identity "Structam <instance>" (STRUCTAM_TAXII_INSTANCE) and marked TLP:AMBER by default, settable per collection.

A reader token, then a request

structam user create -username siem-svc -service -role viewer
structam token create -name taxii-reader -owner siem-svc -role viewer -scopes taxii
curl -H 'Authorization: Bearer stt_...' \
  -H 'Accept: application/taxii+json;version=2.1' \
  https://structam.example.net/taxii2/structam/collections/
Identity providers

LDAP and OpenID Connect

Local accounts with TOTP, LDAP or Active Directory over LDAPS or StartTLS, and several OpenID Connect providers at once. Directory and provider groups map to Structam groups, which hold the grants.

LDAP and Active Directory

  • Bind and search over ldaps://, or ldap:// with StartTLS. Certificates are always verified; a private CA can be added.
  • Groups come from memberOf or a group search, with Active Directory nested groups on request. Memberships are updated at each sign-in and each directory sync (every 15 minutes by default); when a person's entry is deleted, the sync removes what the directory gave them and ends their sessions.
  • Accounts bind to the entry's stable id (objectGUID, entryUUID, else the DN), never to the typed name or an existing local account. By default a user none of whose groups is mapped cannot sign in.
STRUCTAM_LDAP_URL=ldaps://dc1.example.net
STRUCTAM_LDAP_BIND_DN=CN=structam-bind,OU=Service,DC=example,DC=net
STRUCTAM_LDAP_BIND_PASSWORD_FILE=/etc/structam/secrets/ldap_bind_password
STRUCTAM_LDAP_USER_BASE=OU=People,DC=example,DC=net
STRUCTAM_LDAP_USER_FILTER=(sAMAccountName={username})
STRUCTAM_LDAP_NESTED_GROUPS=on

OpenID Connect

  • Authorization code flow with PKCE and nonce. One configuration per provider, by slug; the redirect URI is <public URL>/api/v1/auth/oidc/<slug>/callback.
  • Accounts are created at first sign-in, with no grants unless one of their groups (the groups claim by default) is mapped.
  • Identities bind on provider, issuer and subject. An OIDC identity never attaches to a local or LDAP account, so a provider can never take over an existing account.
  • Break-glass mode: while a provider is enabled, local passwords work only for administrators (STRUCTAM_LOCAL_LOGIN=break-glass).
STRUCTAM_OIDC_PROVIDERS=sso
STRUCTAM_OIDC_SSO_ISSUER=https://sso.example.net
STRUCTAM_OIDC_SSO_CLIENT_ID=structam
STRUCTAM_OIDC_SSO_CLIENT_SECRET_FILE=/etc/structam/secrets/oidc_client_secret
Language models

Ask AI models

Ask AI answers questions about the estate with a model you configure. It is off until you do, no model is bundled, and nothing else in Structam depends on it.

Providers

ProviderSTRUCTAM_LLM_PROVIDERKey
Anthropic Messages APIanthropicrequired
Any OpenAI-compatible chat completions API, including a model on your own hardwareopenaioptional

Both are spoken over plain HTTP from the Go standard library, with no vendor SDK. Tool calls use a text protocol that works with every server, or the provider's native tool calling when you turn it on.

STRUCTAM_LLM_PROVIDER=openai
STRUCTAM_LLM_BASE_URL=http://192.0.2.15:8000/v1
STRUCTAM_LLM_DEFAULT_MODEL=your-model-name

What the model can do

It can only look data up through 14 fixed, read-only tools: search_hosts, get_host, list_host_applications, estate_applications, application_detail, find_by_hash, list_changes, get_change, config_history, config_diff, list_agents, netbox_drift, audit_search and licence_compliance. Each runs in a read-only transaction with a 15 s statement timeout, with the asking user's permissions and scope.

What leaves the installation

The question and the results of the tools the model calls, to the model API you configured, and nothing else. With a model on your own hardware nothing leaves; with a hosted model, the host names, addresses, software, change and audit data in those results do. Values that look like secrets are redacted and results are clipped (600 characters a value, 14 kB a result). Configuration diffs stay redacted unless an administrator turns on send_config_content in the saved setting, which has no environment variable and is audited.

Observability

Prometheus metrics

Every node serves /metrics in the Prometheus text format, written by Structam itself without a client library.

Where

  • On the main listener with an API token of scope metrics.
  • On STRUCTAM_METRICS_ADDR (serve and all) or STRUCTAM_WORKER_ADDR (worker, default :8081) without authentication, for a management network.

What

Job queues and workers per pool (structam_jobs_queue_depth, structam_jobs_oldest_seconds, structam_jobs_workers, structam_jobs_total, structam_job_seconds), HTTP requests by route, NetBox runs and drift, SIEM lag and sink state, TAXII objects published and the licence state, among others. The queue depth is cluster-wide on every node, so aggregate it with max():

max(structam_jobs_queue_depth{pool="ingest"})
max(structam_jobs_oldest_seconds{pool="ingest"})
sum by (state) (structam_jobs_workers{pool="ingest"})

The Kubernetes manifests scale structam worker pods on the ingest queue depth, through a HorizontalPodAutoscaler and a metrics adapter, or KEDA.

Need something else connected?

Tell us what you run next to NetBox, and we will tell you what Structam can and cannot do with it today.