Understanding Metrics
What are Metrics?
Section titled “What are Metrics?”Metrics are structured data points that devices send to CoCoCo during production. They capture the live state of your machines — what job is running, how fast, how many sheets printed, what errors occurred.
CoCoCo stores and processes Metrics so they can be used in Workflows, displayed in dashboards, and queried via GraphQL.
How Metrics work
Section titled “How Metrics work”- A Device sends a Metric payload to CoCoCo via its configured protocol (MQTT, HTTP, etc.)
- CoCoCo receives and stores the Metric, associating it with the Device and the current Job if one is active
- Workflow triggers can react to new Metrics — for example, flagging a job when error count exceeds a threshold
Sending Metrics over MQTT
Section titled “Sending Metrics over MQTT”A device publishes metrics to the relative topic s/metrics. The broker rewrites it to the absolute, tenant-scoped topic t/{tenant}/s/metrics — you publish to s/metrics and the platform fills in the tenant for you. There is no d/{id}/... topic; publishing there is silently dropped.
The payload is a batch of one or more points:
{ "points": [ { "name": "door_open", "value": 1, "kind": "STATUS", "unit": "BOOLEAN", "tags": { "location": "front" }, "timestamp": "2026-02-08T12:00:00Z" } ]}name— machine-readable metric identifier; the metric is auto-created by name per (tenant, device) the first time it is seen.value— must be a finite number.kind— optional (GAUGE,COUNTER,STATUS,RATE); only used when auto-creating. Defaults toGAUGE.unit— optional; only used when auto-creating. Defaults toNONE.tags— optional key-value labels for the point.timestamp— optional ISO 8601 time; defaults to server time.
Enum values are UPPERCASE on the wire — send
kind: "STATUS"andunit: "BOOLEAN", not lowercase.
Other channels: live job progress goes to the separate s/progress topic (rewritten to t/{tenant}/s/progress). Note that OpenInfra’s $rpc/metrics/ingest belongs to a different application and is not the CoCoCo metrics path described here.
Viewing Metrics
Section titled “Viewing Metrics”- Go to Menu → IOT → Metrics
- Select a Device from the list
- Browse recent Metric values in the table
Using Metrics in Workflows
Section titled “Using Metrics in Workflows”Metrics can trigger Workflow executions. Use a Device Metric trigger node and configure the conditions — for example:
sheets_printed > 1000— trigger a quality check taskstatus == "error"— notify the production managerjob_id changed— start tracking a new job