Skip to main content

Data Model

OpenRobOps uses a single MongoDB database (meteor) shared across all components. This page documents the key collections and their schemas.

Collections Overview

CollectionWritten ByRead ByDescription
robotsIngest, Web AppWeb App, APIRobot records and status
localizationIngestWeb App, APIRobot pose, maps, lasers, paths
attr_valuesIngestWeb AppRobot telemetry values
module_statesWeb AppWeb App, APIAgent module (agentlet) run states
mqtt_credentialsWeb AppMQTT BrokerRobot MQTT login credentials
usersMeteor AccountsWeb App, APIUser accounts and roles
robot_statusIngestWeb AppPer-robot computed status entries
robot_vitalsIngest, Web AppWeb AppSystem vitals (CPU, RAM, disk, RTT)
robot_key_valuesIngestWeb AppLast-seen custom data / event keys per robot
custom_dataIngestWeb AppCustom text/image payloads
custom_scriptIngestWeb AppCommand execution feedback
diagnosticsIngestWeb AppROS diagnostics snapshots
timeseriesIngestWeb AppAttribute history for timeline charts
robot_agent_filesIngestWeb AppAgent log file metadata
robot_alertsWeb AppWeb AppAlerts raised from attribute statuses
incidentsWeb AppWeb AppIncidents derived from alerts
notificationsWeb AppWeb AppIn-app notifications (one per open alert)
event_logWeb App, IngestWeb AppAudit log of actions and incident changes
upstream_mqtt_credentialsIngestIngestEncrypted upstream broker credentials

The web app also defines a MongoDB view, view_robots_with_status, which joins robots with their status entries for the fleet list.

There is no single "configuration" collection: each Config API kind handler owns its own collection — attr_defs (DataSourceDefinition), status_config (StatusDefinition), action_defs (ActionDefinition), dashboards (DashboardDefinition), module_states (ModuleState), incident_definitions (IncidentDefinition), and notification_channels (NotificationChannel). See ConfigAPI Storage below.

Robots Collection

Primary collection for robot records.

FieldTypeDescription
_idStringUnique robot identifier
nameStringHuman-readable robot name
hostnameStringRobot hostname
status.agentOnlineBooleanWhether the agent is currently connected
status.valueNumberComputed status severity (max across configured statuses)
versionStringAgent software version
variantStringAgent variant identifier
updateStampNumberLast update timestamp (epoch ms)
lockObjectLock state (userId, userName, locked, lockedTs, expirationTs)
robotKeyStringRobot registration key

Indexes: name (with collation), lock.expirationTs

Localization Collection

Stores robot spatial data. Keyed by robot ID (_id matches robot ID).

FieldTypeDescription
_idStringRobot ID
robotPoseObjectCurrent pose: x, y, theta, frameId, ts
robotPoseUpdatedTsNumberPose update timestamp
laserRangesObjectLaser scan data (keyed by laser ID)
laserRangesUpdatedTsNumberLaser update timestamp
costmapObjectCostmap data
mapObjectMap metadata: mapId, x, y, resolution, dataHash
defaultMapStringCurrent active map label
pathsObjectPath data (keyed by path ID), each with points and ts

Module States Collection

Tracks the run state of agent modules (agentlets) per robot. Written by the web app (AgentManager and the ConfigAPI ModuleState kind), not by ingest.

FieldTypeDescription
entityIdStringRobot ID
moduleNameStringAgentlet name (e.g., "SystemAgentlet", "RosLocalizationAgentlet")
entityTypeStringEntity type (robot / agent / user / system)
runlevelNumberCurrent module run level
minRunlevelNumberMinimum required run level
loadedBooleanWhether the module is loaded

MQTT Credentials Collection

Stores robot authentication credentials for the MQTT broker.

FieldTypeDescription
robotIdStringAssociated robot ID
usernameStringMQTT username (unique)
encryptedPasswordStringEncrypted MQTT password
superuserBooleanSuperuser flag for MQTT ACL
aclsArrayAccess control list entries
brokerIdStringBroker identifier
hostnameStringBroker hostname
portStringBroker port
websocket_portStringBroker WebSocket port
statusStringCredential status
tsCreatedNumberCreation timestamp (epoch ms)
tsUsedNumberLast used timestamp (epoch ms)

Indexes: username and robotId (unique with partialFilterExpression), plus a TTL index on expiresAt for transient UI credentials

Users Collection

Standard Meteor Accounts collection with OpenRobOps extensions.

FieldTypeDescription
_idStringUser ID
emailsArrayEmail addresses
servicesObjectOAuth tokens and API keys (server-only)
services.oro.apiKeysArrayPer-user REST API keys: { id, name, keyHash, expirationTs, lastUsedTs, createdTs, roleId } — only the HMAC keyHash is stored, never the plaintext
userRolesArrayRole strings (e.g., ["admin"])

ConfigAPI Storage

Configuration objects are stored in collections managed by each ConfigAPI kind handler. The general structure follows:

FieldTypeDescription
kindStringConfiguration kind (e.g., "DataSourceDefinition")
metadata.idStringUnique identifier within the kind
specObjectKind-specific configuration payload

Next Steps