Operate
Metrics, events, alerts, logs and traces
What the control plane and the leaders publish. Prometheus series, the event stream, the bundled dashboards and rules, built-in alerts and rules, log shipping and traces.
In short
opod publishes Prometheus metrics, a live event stream, its own alerts, log records and request traces. It installs no Prometheus, Grafana or collector: you point the tools you already run at it. The control plane serves /metrics on port 8080; every leader serves its serving metrics on port 8081. The chart carries two Grafana dashboards and a rule file you can turn on with one value each.
When you need it
- You want opod's metrics and alerts in your existing Prometheus and Grafana.
- You need a pager to ring when an endpoint errors, slows down or runs out of worker slots.
- You want every change and lifecycle step as a stream, for a chat bot or your own tooling.
- You ship the control plane's records and its audit stream to Splunk or an OpenTelemetry collector.
- You trace a slow request through the leader and the engine.
Do it
To scrape both levels with a Prometheus that runs in the cluster:
Scrape the control plane
The Service carries
prometheus.io/scrape: "true"andprometheus.io/port: "8080". A Prometheus that honours those annotations needs nothing more. Otherwise add a static targetopodcp.opod.svc:8080.Scrape every leader
Add the
opod-leadersjob from Metrics below to your Prometheus configuration. It keeps pods that carryopod.io/frontand scrapes their port 8081.Load the rules and dashboards
helm upgrade opodcp oci://ghcr.io/opod-io/charts/opodcp -n opodcp --reset-then-reuse-values \ --set observability.prometheusRules.enabled=true \ --set observability.grafanaDashboards.enabled=trueThis is new in
0.3.0.Send alerts to your pager
Save
OPODCP_NOTIFY_URLSon the Connectors page, then send a test:export H="Authorization: Bearer $(kubectl -n opodcp get secret opodcp-admin -o jsonpath='{.data.token}' | base64 -d)" curl -s -H "$H" -X POST https://cp.example.com/api/v1/connectors/notifier/test
Check it worked
kubectl -n opodcp port-forward svc/opodcp 8080:8080 &
curl -s http://127.0.0.1:8080/metrics | grep -E '^opodcp_(controller_runs_total|cell_gpus|alerts_open)' | headA good answer shows opodcp_controller_runs_total{controller="reconciler"} N and its neighbours, opodcp_cell_gpus with your GPU count, and opodcp_alerts_open per severity. In Prometheus, up{job="opod-leaders"} is 1 for every leader. The notifier test answers {"sent": true, "sinks": […]}.
If it fails
| Symptom | Cause | Fix |
|---|---|---|
The opod-leaders targets read context deadline exceeded | leader isolation blocks the scrape | name your Prometheus in networkPolicy.leaderIsolation.from |
| A panel of a labelled counter is empty | the counter has no series until its first event | nothing to fix; it appears with the first event |
opodcp_usage_sink_lag_rows is NaN | no usage sink is connected | connect one; see Usage |
The notifier test answers 409 E-NO-NOTIFIER | no alert sink is saved | save OPODCP_NOTIFY_URLS |
The notifier test answers "sent": false | a sink refused one half | read that sink's entry in sinks; the doctor's notifier row counts failures |
curl …/events closes after a minute | a proxy cuts long responses | allow long-lived responses on /events; the stream sends : ping every 15 s |
The traces doctor row is red | OPODCP_TRACES_SAMPLE_RATIO is not a number from 0 to 1 | save a value such as 0.1 |
What opod publishes
opod exposes metrics, events, logs and spans and ships the files to read them. It installs no Prometheus, Grafana or collector. Every metric label is an endpoint, a worker, a model or a class, never a key, user or team. Items marked † are new in 0.3.0.
Metrics
The control plane: GET /metrics on its Service, port 8080. The route takes no credential. The Service carries prometheus.io/scrape and prometheus.io/port. The control plane's own families are opodcp_*; the Go runtime and process collectors (go_*, process_*) are there too.
| Series | Type | What it is |
|---|---|---|
opodcp_http_requests_total{route,code} | counter | API requests by route pattern and status, 401/403/429 included |
opodcp_http_request_duration_seconds{route} | histogram | API latency by route pattern; buckets from 2 ms to 10 s |
opodcp_plan_judgements_total{result} | counter | plans judged; result is ok, an E-… code or uncoded |
opodcp_ledger_conflicts_total | counter | admission writes retried because the ledger moved |
opodcp_usage_sink_connected | gauge | 1 when a usage sink is configured, 0 when usage only buffers |
opodcp_usage_sink_lag_rows, opodcp_usage_sink_lag_seconds | gauge | rows the sink has not taken, and the oldest one's age; NaN with no sink |
opodcp_meter_pods_seen_total, opodcp_meter_pods_sized_total | counter | pods the occupancy meter looked at, and those it could size |
opodcp_meter_pods_skipped_total{reason} | counter | pods that accrued nothing; reason is no-observed-status, no-observed-plan, not-running, no-node or no-measurable-share |
opodcp_controller_runs_total{controller}, opodcp_controller_errors_total{controller} | counter | each control loop's runs, and runs that failed or panicked |
opodcp_controller_last_run_timestamp_seconds{controller}, opodcp_controller_last_duration_seconds{controller} | gauge | when each loop last ran, and how long it took |
opodcp_alerts_open{severity} | gauge | open alerts by severity |
opodcp_notify_failures_total{adapter} | counter | alert deliveries that failed, by notifier adapter |
opodcp_cell_gpus, opodcp_licence_max_gpus | gauge | allocatable GPUs in the cell, and the licence ceiling |
opodcp_licence_fleet_over † | gauge | 1 while the fleet control plane reports the cells of this key over it |
opodcp_kv_tier_hit_tokens, _query_tokens, _loaded_bytes, _stored_bytes, _used_percent, _alloc_failures † {endpoint,node} | gauge | each worker's host KV tier: tokens served and looked up, bytes loaded and stored, fill (0–100), and stores refused for room, since its engine started |
Each leader and front door: /metrics on the probe port 8081 (plain HTTP, always on). Families opod_*: opod_request_duration_seconds, opod_time_to_first_token_seconds, opod_requests_total, the opod_admission_* family and more. Serving SLOs are written against these. A leader from core v0.4.0 also exposes its usage push queue on /metrics † (opod_usage_queue_records, opod_usage_queue_bytes, opod_usage_sent_total, opod_usage_export_errors_total, opod_usage_dropped_total{reason}); alert on increase(opod_usage_dropped_total[10m]) > 0, which means usage records are being lost. See core Metrics.
scrape_configs:
- job_name: opod-leaders
kubernetes_sd_configs: [{ role: pod, namespaces: { names: [opod] } }]
relabel_configs:
- { source_labels: [__meta_kubernetes_pod_label_opod_io_front], regex: '.+', action: keep }
- { source_labels: [__meta_kubernetes_pod_ip], target_label: __address__, replacement: '$1:8081' }
- { source_labels: [__meta_kubernetes_pod_label_opod_io_front], target_label: endpoint }
- { source_labels: [__meta_kubernetes_pod_label_opod_io_role], target_label: role }
- { source_labels: [__meta_kubernetes_pod_name], target_label: pod }With leader isolation on, name your Prometheus in networkPolicy.leaderIsolation.from, or the scrape stops.
To push instead of scrape, save OTEL_EXPORTER_OTLP_ENDPOINT on the Connectors page (OTLP/HTTP every 30 s). Headers go in OTEL_EXPORTER_OTLP_HEADERS (k=v,k=v) through extraEnv. The doctor's metrics row counts pushes sent and failed.
Dashboards and Prometheus rules †
The chart carries two Grafana dashboards (opod · serving and opod · control plane) and a rule file. Render them as ConfigMaps:
helm upgrade opodcp … --reset-then-reuse-values \
--set observability.grafanaDashboards.enabled=true --set observability.prometheusRules.enabled=trueGrafana's dashboard sidecar finds them by the label grafana_dashboard: "1" (observability.grafanaDashboards.label, .labelValue). Or extract the files with helm pull … --untar (files/dashboards/, files/prometheus-rules.yaml). The 0.2.1 chart carries neither.
| Rule | Severity | Fires when |
|---|---|---|
OpodEndpointErrors | warning | more than 5 % of an endpoint's requests end in error for 10 minutes |
OpodSlowFirstToken | warning | an endpoint's p95 time to first token is above 5 s for 15 minutes |
OpodShedding | warning | an endpoint sheds requests of a class for 10 minutes |
OpodNoWorkerSlots | critical | an endpoint has no worker slot for 5 minutes |
OpodControlPlaneLoopErrors | warning | a control loop keeps failing for 15 minutes |
OpodControlPlaneLoopStopped | critical | a control loop has not run for 15 minutes |
OpodUsageSinkLagging | warning | the usage sink is more than 30 minutes behind, for 10 minutes |
Also worth a rule: opodcp_usage_sink_connected == 0 for an hour (usage only buffering; do not use absent(), the gauge always exists), and rate(opodcp_meter_pods_sized_total[30m]) == 0 and rate(opodcp_meter_pods_seen_total[30m]) > 0 (GPU-seconds not recorded). A labelled counter has no series until its first event, so an empty panel means none yet.
Events
Every change and lifecycle step is an event on the control plane's bus. The console reads them live; you can too.
TICKET=$(curl -s -H "$H" -X POST https://cp.example.com/api/v1/stream-ticket | jq -r .ticket)
curl -N "https://cp.example.com/events?ticket=$TICKET"GET /events is a Server-Sent Events stream (viewer). A browser cannot send a header there, so it takes a single-use ticket from POST /api/v1/stream-ticket as ?ticket=. Each message is id: <seq>, event: <type> and data: the event as JSON: { "seq", "ts", "type", "subject", "data" }. subject is usually the endpoint, node, run or job id. A reconnect with Last-Event-ID (or ?since=<seq>) replays up to 1,000 missed events from the journal first. A comment : ping arrives every 15 s. With more than one replica, connect the events port to NATS, or a stream on one replica misses what another publishes. GET /api/v1/events/recent returns the last 200 events the control plane pulled from its leaders.
The same events also ship to the logs connector as the events stream.
| Area | Types |
|---|---|
| Endpoints | endpoint.created, endpoint.updated, endpoint.deleted, endpoint.recreated †, status.changed, plan.applied, plan.deprecated-flag, policy.updated, endpoint.advisory, endpoint.adapters, endpoint.slo, endpoint.remote_key, endpoint.cert-renewed, endpoint.leader-moved, endpoint.pod-event †, endpoint.worker-restarted †, endpoint.worker-identity-revoked, endpoint.template-drift, endpoint.template-rolled, gang.gave-up †, fabric.policy, image.unsigned, image.unverified |
| Runs and rollouts | run.started †, run.step †, run.step-progress †, run.finished †, run.cancel-requested †, rollout.canary, rollout.canary-weight, rollout.canary-verdict, rollout.canary-unjudged, rollout.canary-promoted, rollout.canary-aborted, rollout.eval, rollout.signature-hold †, rollout.signature-accepted †, rollout.signature-rejected †, rollout.woke |
| Scaling | autoscale.granted, autoscale.scaled, autoscale.slept, autoscale.woke |
| Machines | node.cordoned, node.drained, node.evacuated, node.removed, node.sharing-changed †, gpu.reset †, cache.pruned, kvtier.swept †, pod.forced †, pod.remnant †, pod.remnant-resolved †, remnant.found †, remnant.resolved † |
| Models | model.created, model.deleted, model.version, model.version-rollback, model.warm-started, model.approval-policy †, cell.hub-token |
| Keys, users and teams | key.created, key.revoked, auth.login, auth.login_failed, auth.updated, auth.user_deleted, auth.token_created †, auth.token_revoked †, user.created, team.quotas.changed |
| Alerts | alert.fired, alert.resolved, alert.acked, alert.rules_changed |
| Connectors, usage and data | connector.saved †, connector.verified †, connector.changed †, secrets.synced †, usage.captured, usage.cursor_reset, usage.sink_skipped, fleet.events, backup.taken, backup.restored, audit.rebased, audit.retention_changed |
| Licence | licence.updated, licence.burst-started, licence.burst-ended, licence.fleet-over †, licence.fleet-under † |
| Cell door | door.auto-routes † |
| Jobs | job.submitted, job.placed, job.running, job.preempted, job.deleted, and job.<state> for queued, placing, running, preempted, succeeded, failed, cancelled |
| Batches | batch.created, batch.file.uploaded, batch.in_progress, batch.cancelling, and batch.<status> for completed, failed, expired, cancelled |
In 0.2.1 a rollout publishes rollout.started, rollout.step, rollout.step-progress and rollout.finished; 0.3.0 publishes run.* for every kind of run instead.
Alerts inside the control plane
The control plane raises its own alerts and keeps them in the database with fire, resolve and acknowledge. One alert is open per kind and object. A condition alert resolves after three healthy observations in a row (about 45 s). A sticky alert resolves only on acknowledge, or when its subject is deleted. Each alert carries a title, a detail and a remedy. The bell in the console's top bar lists open ones.
| Kind | Severity | Raised when |
|---|---|---|
endpoint.degraded | serious | an endpoint is degraded |
endpoint.engine-unhealthy | warning | a worker's pod runs while its engine crash-loops or stopped |
endpoint.worker-slow | warning | the endpoint's leader ranks a worker down because it answers slower than its siblings (routing.slowFactor); resolves about 45 s after the leader stops listing it. Arrives in the release after 0.3.6 |
endpoint.images-unverified | warning, sticky | the endpoint runs images whose signature was not verified |
endpoint.foreign-objects | warning | workloads in the namespace belong to no endpoint in this store |
plan.node-missing | serious | a plan is pinned to a node that left the cluster |
rollout.failed | serious, sticky | a rollout failed |
gang.gave-up † | serious | a gang could not form after three tries and is parked |
autoscale.no-capacity | warning | the next worker cannot be placed |
autoscale.scaler-unhealthy | warning | KEDA owns the endpoint and its ScaledObject is absent or not ready |
autoscale.grant-below-floor | warning | the ledger granted fewer worker slots than the plan's floor |
worker.memory-near-limit † | warning | a worker with a KV tier uses most of its memory limit |
node.notready | warning | a node is NotReady |
node.cache-low | warning | a node's model cache is nearly full |
node.remnant † | serious | pods of ours left the API without proof their processes ended; the node is cordoned |
gpu.unhealthy | serious | the probe read a card as faulted (uncorrected ECC, hardware slowdown) |
gpu.held-outside † | warning | a card's memory is in use and nothing of ours holds it |
usage.no-sink | warning | no usage sink, and the buffer has grown past what an outage explains; after 0.3.6 it also fires, naming the reason, when a saved sink did not open |
usage.sink-holding | serious | the sink is behind and rows are kept past the retention window |
connector.failing † | warning | a connected port has failed its doctor check for a while |
connector.sealed † | warning | a port's stored credentials were sealed with another install key |
rule.<id> | the rule's | one of your alert rules breached |
curl -s -H "$H" "https://cp.example.com/api/v1/alerts?state=open"
curl -s -H "$H" -X POST https://cp.example.com/api/v1/alerts/<id>/ackIn the release after 0.3.6, opodcp alerts ls --open prints the same list as a table, and --json gives each alert's detail and remedy. See the CLI reference.
Alert rules of your own: PUT /api/v1/alert-rules (admin, the whole list, If-Match honoured) with up to 64 rules. GET /api/v1/alert-rules reads them.
| Metric | What it measures |
|---|---|
endpoint.error_rate_pct | errors ÷ requests × 100 over the window |
endpoint.p95_latency_ms | p95 request latency over the window |
node.vram_headroom_gb | the most free VRAM on any one GPU of the node |
node.offline_minutes | minutes since the node stopped being Ready |
key.expiry_days | days until an active endpoint key expires |
endpoint.cert_expiry_days | days until the endpoint's embedded certificate expires (negative = expired) |
gpu.ecc_uncorrected | uncorrected ECC errors a card reported since boot |
usage.sink_lag_minutes | the age of the oldest row the sink has not taken; no sink gives no reading |
node.nic_down_count | the release after 0.3.6: NICs on the node with link down |
node.nic_drop_per_min | the release after 0.3.6: the worst NIC's received plus sent drops per minute |
node.peer_loss_pct | the release after 0.3.6: the worst packet loss from the node's probe to any peer. A peer that is down (its own probe sent no fresh round) is left out, so one NotReady machine does not make every other machine fire |
fabric.proof_gbps_below_floor | the release after 0.3.6: how far the newest fabric proof of a node set is below the bandwidth floor, in GB/s |
worker.heartbeat_age_seconds | the release after 0.3.6: the oldest worker heartbeat of an endpoint; the router stops dispatching to a worker past 30 s. Scope by endpoint name |
[{ "id": "chat-errors", "name": "chat error rate", "metric": "endpoint.error_rate_pct", "op": "gt", "threshold": 2,
"scope": "chat", "severity": "serious", "windowMinutes": 15, "enabled": true }]id is lowercase letters, digits, ., _ and - (1–64 characters). op is gt or lt; threshold is 0 or more. windowMinutes applies to the two endpoint rates only (default 15, at most 1,440). scope is an endpoint or node name; empty means every object. severity is warning (the default), serious or critical. Each breach is an alert of kind rule.<id>, fired once per object and healed after three healthy observations.
Delivery. Deliver alerts to your pager with the notifier connector: OPODCP_NOTIFY_URLS, a comma-separated list of https://… (a webhook that receives {event, alert} JSON), alertmanager+https://… (Alertmanager v2), slack+https://… (a Slack incoming webhook) and pagerduty://<routing key> (Events API v2, trigger, acknowledge, resolve). The list is stored sealed. POST /api/v1/connectors/notifier/test (admin) sends one alert marked TEST to every sink and answers per sink; with no sink it answers 409 E-NO-NOTIFIER. Delivery is bounded at 10 s and never blocks the control plane. See Connectors.
Logs
The control plane writes JSON records to stdout. The logs connector also ships three streams, chosen by OPODCP_LOGS_STREAMS (default all three):
| Stream | What | Splunk sourcetype |
|---|---|---|
cp | the control plane's own log records | opodcp:cp |
audit | actions somebody took, with the actor | opodcp:audit |
events | lifecycle events nobody took: rollout steps, autoscaling, alerts | opodcp:events |
Choose the adapter with OPODCP_LOGS_ADAPTER on the Connectors page:
OPODCP_LOGS_ADAPTER | Settings |
|---|---|
stdout (default) | none |
otlp | OPODCP_LOGS_URL=http://otel-collector:4318; optional OPODCP_LOGS_TOKEN (sent as a bearer) and OPODCP_LOGS_HEADERS (k=v,k=v). Every leader also gets the URL as OPOD_OTLP_LOGS_ENDPOINT for its own records |
splunk-hec | OPODCP_LOGS_URL=https://splunk.example.com:8088, OPODCP_LOGS_TOKEN (the HEC token). Leaders get no log URL under this adapter |
The token is stored sealed. Shipping never blocks: the queue holds 4,096 records and flushes every 2 s, each export call has 5 s, and a failed batch is counted and dropped, not retried. The doctor's logs row counts sent, failed and dropped. Engine and pod stdout are your log agent's job: collect /var/log/pods/opod_*/*/*.log. Useful pod labels for routing: opod.io/endpoint, opod.io/endpoint-id, opod.io/role, opod.io/job, app.kubernetes.io/name=opodcp.
Traces
Save OPODCP_TRACES_URL (an OTLP/HTTP collector) on the Connectors page, and optionally OPODCP_TRACES_SAMPLE_RATIO (0 to 1; empty traces every request, and a request its caller sampled is always kept). Every leader then exports its request spans there as OPOD_OTLP_ENDPOINT, and every worker pod gets OTEL_SERVICE_NAME=<engine> so the engine's own spans are named. The control plane sends no spans itself; the doctor's traces row says whether the collector answers a dial. A leader picks the setting up at its next rollout.
Last updated · Source: content/docs/control-plane-operate/observability.mdx · View as Markdown