Observability
Health
| Endpoint | Meaning |
|---|---|
GET /healthz | The process is up. |
GET /readyz | The replica is not shutting down and reaches PostgreSQL within a second. Valkey is left out: every replica shares it, and failing on it would take them all out of service at once. |
GET /v1/system (settings:read) returns the version and the replica name.
Metrics
Each API server exposes Prometheus metrics on /metrics, port 8080. The platform Ingress only routes /v1, so /metrics is reachable inside the cluster only.
| Metric | Type | Labels | Meaning |
|---|---|---|---|
idekube_http_requests_total | counter | method, route, status | HTTP requests. route is the route template, not the path. |
idekube_http_request_duration_seconds | histogram | method, route | HTTP request duration. |
idekube_objects | gauge | kind, phase | Number of rows by kind (workspace, volume) and phase. |
idekube_work_running | gauge | loop | Items this replica runs: jobs (loop jobs) and rows reconcilers act on (reconcile.workspaces, reconcile.volumes). |
idekube_work_items_total | counter | loop, outcome | Items run, by outcome: done, failed, lost (cancelled because the lease could not be renewed in time; a steady rate points at the database) or released (handed back on shutdown). |
idekube_work_duration_seconds | histogram | loop | How long items ran. |
idekube_panics_total | counter | where | Panics recovered. A panic fails the one request, job attempt, reconciled row or link frame it happened in, and is logged with its stack; any increase is a bug worth reporting. |
idekube_worker_agents | gauge | worker | Agents of each worker linked to this replica. Summed over the replicas, it is the number of connected agents; 0 everywhere means the worker is offline. |
idekube_link_requests_total | counter | direction, kind, result | Requests and notices over the links to agents: sent by this replica, such as the commands that apply a workspace (kind command.apply.workspace), or served, such as the gateways' authorize and the sidecars' sidecar. result is ok or error. |
idekube_link_request_duration_seconds | histogram | direction, kind | How long they took. A sent command waits for the agent to apply it in its cluster. |
idekube_workspace_authorizations_total | counter | result | Requests to workspaces the gateways asked about: allowed, denied or error. |
The standard process (process_*) and Go runtime (go_*) metrics of the Prometheus client library are exposed as well.
idekube_objects is read from the database on every scrape, so every replica reports the same values. Aggregate it with max, not sum.
Agents
An agent answers GET /healthz while its process is up, and GET /readyz once it knows the cluster's objects and serves its gateway, which restarts on its own when it fails. It is not ready while it stops, nor while it has had no link to the control plane for 20 seconds and another agent of the worker has one. When no agent has a link, e.g. while the control plane restarts, readiness leaves the link out, and the requests already allowed go on being served meanwhile; idekube_agent_connected tells it. GET /standing tells the worker's other agents whether it has a link.
Each agent exposes its own metrics on /metrics, port 8081, along with the process and Go runtime metrics:
| Metric | Type | Labels | Meaning |
|---|---|---|---|
idekube_agent_connected | gauge | 1 while the link to the control plane is up. | |
idekube_link_requests_total, idekube_link_request_duration_seconds | direction, kind, result | As above, from the agent's side: the commands it served, the authorizations and sidecar settings it sent. | |
idekube_gateway_checks_total | counter | outcome, cached | Requests the gateway asked the agent about. outcome is allowed, denied, no_credential, not_running, unknown_host, limited (too many new credentials from one address) or unavailable (the control plane did not answer); cached tells whether a remembered decision answered. |
idekube_agent_leading | gauge | 1 while the agent leads the worker's agents in its cluster; one agent of a worker at a time. | |
idekube_agent_orphan_claims | gauge | Claims of volumes the control plane does not know for this worker, found by the last snapshot. The leading agent removes them after the orphan grace period (after orphan workspaces are deleted), never while in maintenance. |
Resource metrics
Each worker's leading agent tells, every minute, what its running workspaces use (CPU, memory, GPU when reported by kubelet, and traffic), what the volumes they mount hold, and what its nodes use of what they can give (CPU, memory, node filesystem storage, and GPU capacity/utilization when present), as each node's kubelet says through its Summary API. The worker chart grants it nodes/proxy (get) for that; agent.usage: false takes both the permission and the sampling away, and the worker then tells nothing.
The Metrics page (worker:read) shows cluster summary panels (CPU, memory, storage when reported, and GPU when GPU nodes or metrics exist), a Grafana-style node dashboard with gauges and expandable per-node history charts, the busiest workspaces, and volume storage usage. With a Prometheus set, it plots cluster and per-node CPU, memory, storage, GPU (from idekube_node_gpu_busy_percent or DCGM_FI_DEV_GPU_UTIL when DCGM Exporter is scraped), running workspaces and traffic from the last hour to the last week. A workspace's drawer shows what it uses of what it may. The latest values are kept in the database, and exposed by every API server for Prometheus to keep the history of:
| Metric | Labels | Meaning |
|---|---|---|
idekube_node_cpu_cores, idekube_node_memory_bytes | worker, node | What a node uses. |
idekube_node_allocatable_cpu_cores, idekube_node_allocatable_memory_bytes | worker, node | What it can give to pods. |
idekube_node_fs_used_bytes, idekube_node_fs_capacity_bytes | worker, node | Node filesystem used and capacity. |
idekube_node_gpu_count, idekube_node_gpu_used | worker, node | Allocatable and allocated GPUs on GPU nodes. |
idekube_node_gpu_busy_percent, idekube_node_gpu_memory_used_bytes, idekube_node_gpu_memory_total_bytes | worker, node | GPU duty cycle and framebuffer memory on GPU nodes. |
idekube_workspace_cpu_cores, idekube_workspace_memory_bytes | worker, workspace, team | What a running workspace uses; memory it cannot give back. |
idekube_workspace_gpu_busy_percent, idekube_workspace_gpu_memory_bytes | worker, workspace, team | GPU duty cycle and framebuffer memory of a GPU workspace. |
idekube_workspace_network_receive_bytes_per_second, ..._transmit_... | worker, workspace, team | Its traffic over the last minute. |
idekube_volume_used_bytes, idekube_volume_capacity_bytes | worker, volume, team | What a volume holds, as last measured while mounted, and may hold. |
As idekube_objects, every replica reports the same values: aggregate with max. A workspace or node a worker no longer tells of is no longer reported; what a volume held stays until it is measured again.
observability. | Default | |
|---|---|---|
prometheus_url | the bundled one, when prometheus.enabled | A Prometheus that scrapes the API servers, which the Usage page asks for the history; only the queries the page draws are sent. Empty shows only what is used now. |
volume_full_percent | 90 | Tell a volume's creator, or its team's owners once the creator is gone, when it is this full; once each time it gets so, again after it went below by five points. 0 tells nobody. |
Scraping
The API server pods carry the annotations prometheus.io/scrape: "true", prometheus.io/port: "8080" and prometheus.io/path: /metrics. A Prometheus that discovers pods by annotation picks them up without further configuration.
The agent pods carry the same annotations, with port 8081.
For clusters without one, prometheus.enabled: true deploys a small Prometheus that scrapes every API server replica and every agent of the local worker every 30 seconds:
prometheus:
enabled: true
retention: 15d
storage:
size: 20Gi
Reach it with kubectl -n idekube port-forward pod/idekube-prometheus-0 9090.
Logs
The API server logs to standard output only; shipping and retention belong to the cluster. The chart turns on JSON logging: one object per line with time, level, logger and message, followed by the fields of the event, such as error, and the request_id of the request it happened in. apiserver.logLevel sets the level the server starts with.
How much is logged is a runtime setting, so a long-running installation is quietened or made verbose without a restart:
logging. | Default | |
|---|---|---|
level | empty | debug, info, warn or error; empty keeps the level the server started with. |
access_log | errors | Which API requests get a line from the access logger: off, errors (failed and slow ones) or all. |
slow_request_ms | 2000 | A request taking longer is logged as slow. |
A request line has the method, the route template, the path without its query (which may carry codes and tickets), the status, the duration, the client address and whether it was slow.
filebeat.enabled: true deploys Filebeat as a DaemonSet that ships the container logs of the release namespace and of the workspaces namespace, that is, both the control plane and the workspaces. The JSON lines of the API servers are decoded into the idekube field. filebeat.output is rendered verbatim as the output section of filebeat.yml:
filebeat:
enabled: true
output:
elasticsearch:
hosts: ["http://elasticsearch:9200"]
Filebeat runs as root with host paths mounted, and the chart creates a ClusterRole for it to read pod, namespace and node metadata.
Workers in other clusters
What the platform's chart collects covers its own cluster, and so the worker installed with it. A worker in another cluster collects nothing beyond what its agents send the control plane, unless its installation asks: the worker chart's Prometheus and Filebeat are optional, and off by default, for an installation may already run its own or want none.
prometheus:
enabled: true
externalLabels: {worker: gpu-a}
# Forward to a central Prometheus, e.g. the platform's or the organisation's.
remoteWrite:
- url: https://prometheus.example.org/api/v1/write
filebeat:
enabled: true
fields: {worker: gpu-a}
output:
elasticsearch:
hosts: ["http://elasticsearch.example.org:9200"]
The worker's Prometheus scrapes its agents and, through the API server, the cAdvisor of every node, keeping only the series of the workspaces' namespace; it may read the nodes' proxy (nodes/proxy, get) for that. Its series carry externalLabels wherever they are sent. Its Filebeat ships the logs of the agents and of the workspaces, each event with fields. Both take their images through global.imageRegistry, as every image of the chart does.
Audit log
The actions listed below are recorded in the audit_logs table, each in the same database transaction as the change it describes: the record commits with the change or not at all.
A record has the time (at), the actor (actor_id, actor_name), the action, the target, the client ip and a detail object. Actions the platform takes on its own, such as stopping an idle workspace, have the actor name system. What was done with an API token names the token in detail.token by its first twelve characters, which the owner's list of tokens shows.
| Area | Actions |
|---|---|
| Sign-in | auth.login, auth.login_failed, auth.mfa_failed, auth.device_authorize |
| Users | user.create, user.update, user.delete, user.password_change, user.unblock, user.sessions_revoke, and the user.mfa_*, user.token_*, user.ssh_key_*, user.identity_* and user.variable_* changes of accounts |
| Roles | role.create, role.update, role.delete |
| Teams | team.create, team.update, team.delete, team.member_*, team.credit |
| Templates | template.create, template.update, template.delete, template.submit, template.withdraw, template.approve, template.reject |
| Workspaces | workspace.create, workspace.update, workspace.start, workspace.stop, workspace.delete, workspace.forget, workspace.require_revision, workspace.attach, workspace.detach, workspace.variable_* |
| Clusters | cluster.create, cluster.update, cluster.start, cluster.stop, cluster.delete |
| Volumes | volume.create, volume.update, volume.recreate, volume.delete, volume.forget |
| Workers | worker.create, worker.update, worker.delete, worker.rotate_token, worker.resume, worker.drain |
| Network | network.update, network.worker |
| Notifications | notification.announce |
| Settings and plugins | settings.update, plugin.enable, plugin.disable |
| Plugins' own | named after them, such as git.connect or canvas.register |
| Jobs | job.create, job.run, job.retry, job.cancel, job.schedule |
| Audit | audit.export |
Read it on the Audit page or with GET /v1/audit (audit:read). The endpoint filters by q (actor name or target), action (prefix, so workspace. matches all workspace actions), since and until.
Records older than audit.retention_days (default 180) are deleted by the hourly audit.prune job, a few thousand at a time so that years of records go without one long transaction. To keep them longer, export them first: Export on the Audit page, or GET /v1/audit/export with the same filters, streams every selected record, oldest first, as JSON Lines. Each export is itself recorded as audit.export.