Skip to content

fix(observability): query the labels cbox-init actually emits - #30

Merged
sylvesterdamgaard merged 1 commit into
mainfrom
fix/cbox-init-metric-labels
Sep 24, 2026
Merged

sylvesterdamgaard merged 1 commit into
mainfrom
fix/cbox-init-metric-labels

Conversation

@sylvesterdamgaard

Copy link
Copy Markdown
Contributor

The cbox-init dashboard and docs used labels and metrics that cbox-init doesn't emit, so the status, queue, health, CPU and scheduled-task panels showed nothing. This makes them match what cbox-init v3.7.0 actually exposes.

Labels

  • process_up, restarts_total, current_scale, desired_scale and health_check_status label the process as name, not process.
  • The health check type label is type, not check_type.
  • Only the resource metrics (cpu_percent, memory_bytes, ...) use process.
  • Fixed in the dashboard, observability/README.md alert rules, docs/observability/cbox-init-integration.md and docs/observability/health-checks.md.

Metrics that don't exist

  • cbox_init_process_cpu_seconds_total was never a cbox-init metric. The CPU panel now uses cbox_init_process_cpu_percent, with unit percent instead of percentunit.
  • The whole cbox_init_scheduled_task_* family was made up; cbox-init removed it from its own docs in August. The dashboard row, the alert rule and the doc sections are gone, and the docs now point to the schedule API.

Also

  • The memory panel shows RSS only; before, RSS and VMS were drawn under one legend.
  • The memory and CPU panels say they need CBOX_INIT_GLOBAL_RESOURCE_METRICS_ENABLED=true, because cbox-init ships with resource metrics off. I checked that this env var does turn them on.
  • The docs explain that under Prometheus' default honor_labels: false, cbox-init's instance label is stored as exported_instance. The dashboard's Instance variable relies on this.
  • Fixed the broken integration-guide link in observability/README.md.

Checks: the dashboard JSON is still valid, and the env-contract, docs-versions and runtime-deps checks pass.

The label reference linked from the docs arrives with cboxdk/init#146.

The process, scale and health metrics label the process as `name`; only
the resource metrics use `process`. The dashboard, observability README and
docs selected on `process=` (and `check_type` instead of `type`), so those
panels and alerts matched nothing.

Also drops panels and docs for metrics cbox-init never exported
(cbox_init_process_cpu_seconds_total, cbox_init_scheduled_task_*), switches
the CPU panel to cbox_init_process_cpu_percent, and documents the
exported_instance rename under Prometheus' default honor_labels: false.
@sylvesterdamgaard
sylvesterdamgaard merged commit 17707dd into main Sep 24, 2026
5 checks passed
@sylvesterdamgaard
sylvesterdamgaard deleted the fix/cbox-init-metric-labels branch September 24, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant