Skip to content

Data model

Built

The whole platform’s relational shape in one diagram: every table, its primary and foreign keys, and the references between them. It is generated from the live schema by make gen, so it cannot fall out of step with the tables; a schema change that forgets to regenerate is caught by the ERD drift test.

Tables are grouped into subsystem containers. Each table shows only its primary-key and foreign-key columns, the relational skeleton; the full column list lives in its migration and its Storage Gateway type. Each edge is a foreign key, drawn from the referencing column to the row it points at; edges that cross container borders are the seams between subsystems (fleet.component.product_id pointing at catalog.product.id).

A table not yet assigned to a subsystem would render in an unclustered container, but the introspection test hard-fails on any unmapped table, so the failure is the prompt to add the table to the cluster map in internal/erd/cluster.go (cmd/erdgen only calls it).

identityestatecatalogtelemetrycollectionconfigcontentauditchoice_alternateiduuidPKchoice_iduuidFKowner_kindtextFKowner_refuuidFKhumanprincipal_iduuidPKimpersonation_sessioniduuidPKreal_actor_principal_iduuidFKtarget_principal_iduuidFKprincipaliduuidPKprincipal_grantiduuidPKgroup_iduuidFKprincipal_iduuidFKrole_iduuidFKprincipal_groupiduuidPKprincipal_group_membergroup_iduuidPKprincipal_iduuidPKroleiduuidPKrole_choiceiduuidPKstandard_iduuidFKsystem_iduuidFKowner_kindowner_refserviceprincipal_iduuidPKsystem_roleiduuidPKalternate_iduuidFKowner_kindtextFKowner_refuuidFKstandard_iduuidFKsystem_iduuidFKsystem_role_assignmentiduuidPKcomponent_iduuidFKrole_iduuidFKsystem_iduuidFKsystem_role_productproduct_iduuidPKrole_iduuidPKsystem_role_typecomponent_type_iduuidPKrole_iduuidPKcomponentiduuidPKlocation_iduuidFKparent_iduuidFKproduct_iduuidFKinterfaceiduuidPKcomponentuuidFKnode_nameuuidFKtypeuuidFKinterface_typeiduuidPKlocationiduuidPKlocation_typeuuidFKparent_iduuidFKlocation_typeiduuidPKlocation_type_metriciduuidPKlocation_type_iduuidFKmetric_type_iduuidFKlocation_type_propertyiduuidPKlocation_type_iduuidFKproperty_type_iduuidFKsystemiduuidPKlocation_iduuidFKparent_iduuidFKstandard_iduuidFKsystem_memberiduuidPKcomponent_iduuidFKsystem_iduuidFKcomponent_typeiduuidPKparent_iduuidFKdriveriduuidPKproductiduuidPKcomponent_type_iduuidFKdriver_iduuidFKparent_product_iduuidFKvendor_iduuidFKproduct_metriciduuidPKmetric_type_iduuidFKproduct_iduuidFKproduct_propertyiduuidPKproduct_iduuidFKproperty_type_iduuidFKstandardiduuidPKparent_standard_iduuidFKstandard_metriciduuidPKmetric_type_iduuidFKstandard_iduuidFKstandard_propertyiduuidPKproperty_type_iduuidFKstandard_iduuidFKvendoriduuidPKalarmiduuidPKcomponent_iduuidFKcommandidbigintPKcaused_event_idbigintFKcommand_type_iduuidFKcomponent_iduuidFKlocation_iduuidFKnode_iduuidFKsystem_iduuidFKcommand_typeiduuidPKtarget_metric_type_iduuidFKtarget_property_type_iduuidFKeventidbigintPKcomponent_iduuidFKevent_type_iduuidFKlocation_iduuidFKnode_iduuidFKsource_event_idbigintFKsource_log_line_idbigintFKsystem_iduuidFKevent_typeiduuidPKlog_lineidbigintPKcomponent_iduuidFKmetricidbigintPKcommand_idbigintFKcomponent_iduuidFKevent_idbigintFKlocation_iduuidFKmetric_type_iduuidFKnode_iduuidFKsystem_iduuidFKmetric_typeiduuidPKpropertyidbigintPKcommand_idbigintFKcomponent_iduuidFKevent_idbigintFKlocation_iduuidFKnode_iduuidFKproperty_type_iduuidFKsystem_iduuidFKproperty_typeiduuidPKnodeprincipal_iduuidPKlocation_iduuidFKnode_logidbigintPKnode_iduuidFKtaskidtextPKinterface_iduuidFKcredentialiduuidPKprincipal_iduuidFKsecretiduuidPKcomponent_iduuidFKlocation_iduuidFKsecret_typeuuidFKsystem_iduuidFKsecret_typeiduuidPKsetting_overrideiduuidPKvariableiduuidPKcomponent_iduuidFKlocation_iduuidFKsystem_iduuidFKblobsha256textPKfileiduuidPKsha256textFKtagiduuidPKtag_bindingiduuidPKcomponent_iduuidFKlocation_iduuidFKnode_iduuidFKsystem_iduuidFKtag_iduuidFKaudit_logiduuidPKactor_principal_iduuidFKreal_actor_principal_iduuidFK
  • identity - who can act and what they may do: principals (human and service), groups, grants, roles, the typed-slot system-role guard, and the impersonation trail.
  • fleet - what is being monitored: locations, systems, components, and the interfaces a component exposes.
  • catalog - the shared reference library: vendors, products, drivers, component types, and standards, plus the properties they define.
  • telemetry - the five-lane observability model (ADR-0063, ADR-0079): the typed registries (metric_type, property_type, event_type, command_type) over the bare-noun data tables (metric, property, event, command, log_line) and the alarms raised off them (alarm).
  • collection - where and how telemetry is gathered: the nodes that run probes, the tasks they execute, and the node_log self-log lane.
  • config - the settings, variables, secrets, and credentials that parameterize everything above.
  • content - the cross-cutting attachments: blobs, files, and the tag bindings that label any entity.
  • audit - the immutable record of every privileged mutation and auth event.