Endpoint
Body
Field reference
Response
The cloud acknowledges a heartbeat with a small JSON body:definitions_version is an opaque string that changes whenever the
metric definitions assigned to this agent change: a metric is
created, edited, deleted, or moved to or from this agent. The
GET /api/agent/metrics-definitions response carries the same value
in its X-Observer-Definitions-Version header. When a heartbeat
returns a version that differs from the one of the agent’s last
fetch, the agent fetches its definitions again right away, so a
change in the console reaches the agent within about one heartbeat
interval (30 seconds). Agent 1.6.0 and later act on it.
When two processes share one agent key, the response to the process
that lost ownership is { "ok": true, "fenced": true } with no other
fields. See Duplicate key detection.
The definitions_version field is optional. An agent that does not recognise it, or a
cloud that does not send it, falls back to the periodic fetch:
every 30 seconds for the first 10 minutes after start while the
agent has no definitions, then every 5 minutes. Agents older than
1.6.0 fetch every 5 minutes.
Lag and uptime alerts
The queue and uptime numbers in the heartbeat drive two alerts:agent.lag_high: opens whenqueue_depthis above 1000 orqueue_oldest_age_secondsis above 300.agent.uptime_degraded: opens when uptime over the last 24 hours falls below 95%.
agent.offline event fires when the cloud stops receiving
heartbeats from the agent.
Duplicate key detection
The agent sends its start time in anAgent-Started-At header on
every request. When two processes share one agent key, the cloud
treats the most recently started process as the owner:
- Heartbeats from the older process are acknowledged but ignored. They do not count toward uptime and do not update the dashboard.
- Pushes from the older process are rejected with HTTP 409. The agent drops the rejected samples instead of retrying and logs a warning at most once every five minutes.
- The dashboard shows a duplicate key warning on the agent, and an
agent.duplicate_keyalert event fires (stateopen) to any destination on the Alerts page that subscribes to it. Once the older process goes quiet for ten minutes, the warning clears and aclearedevent follows.
agent_started_at records a restart. There is one escape hatch:
when the process holding the newer start time stops heartbeating
for ten minutes, a fenced process may take over as the owner. This
recovers a single agent whose clock moved backwards across a
restart without operator action. To resolve a duplicate key
situation, stop one of the two processes, or rotate the key and give
each deployment its own agent.

