Skip to content

fix(chart): dashboard filters on job, not the unset service=s3proxy#47

Merged
ynsta merged 1 commit into
mainfrom
chart/dashboard-job-variable
May 20, 2026
Merged

fix(chart): dashboard filters on job, not the unset service=s3proxy#47
ynsta merged 1 commit into
mainfrom
chart/dashboard-job-variable

Conversation

@ynsta
Copy link
Copy Markdown
Contributor

@ynsta ynsta commented May 20, 2026

Summary

Every dashboard panel filtered on service="s3proxy", but the
ServiceMonitor-applied service label is the release-prefixed Service
name (e.g. service="cockpit-s3proxy"), so the filter never matched and
panels rendered "No data". job carries the same release-prefixed
value but is the label Prometheus actually exposes consistently.

This patch:

  • Adds a job template variable (label_values(http_requests_total, job))
    between the existing datasource and instance variables, so the
    dashboard picks up whatever job string Prometheus emits.
  • Replaces service="s3proxy" with job=~"$job" in every panel target
    and in the instance variable's query.
  • Adds the same job=~"$job" filter to the s3proxy_* panels (panels 5
    and 6) so they also scope correctly in multi-release clusters.

Chart bump 1.9.1 → 1.9.2. No values changes.

See CHANGELOG.mdChart / 1.9.2.

Test plan

  • jq . charts/s3proxy/dashboards/s3proxy.json >/dev/null — valid JSON
  • helm lint charts/s3proxy — passes
  • helm template t charts/s3proxy --set grafanaDashboard.enabled=true --show-only templates/grafana-dashboard.yaml | grep -cF 'job=~\"$job\"'11 (≥ 11)
  • Same render: grep -cF 'service=\"s3proxy\"'0 (no stale filter)
  • Apply against the cluster that triggered the bug; confirm panels
    populate and the Job picker lists e.g. cockpit-s3proxy.
  • CI green on chart/dashboard-job-variable.

Release flow

Merge → tag chart-v1.9.2 on main → CI publishes
ghcr.io/intrinsec/s3proxy/charts/s3proxy:1.9.2.

🤖 Generated with Claude Code

Every dashboard panel filtered on `service="s3proxy"`, but the
ServiceMonitor-applied `service` label is the release-prefixed Service
name (e.g. `service="cockpit-s3proxy"`), so the filter never matched and
panels rendered "No data". Switch every panel target and the `instance`
variable query to `job=~"$job"`, and add a new `Job` template variable
backed by `label_values(http_requests_total, job)` so the picker shows
whatever job Prometheus actually emits.

Chart bump 1.9.1 -> 1.9.2.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@ynsta ynsta merged commit cec5079 into main May 20, 2026
5 checks passed
@ynsta ynsta deleted the chart/dashboard-job-variable branch May 20, 2026 11:23
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