Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Task]: Generate Prometheus profile integration pages from profile YAML

Đang mở
#22,683 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@ilyam8 đang làm issue này rồi.

Từ ngày 11/6/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

Problem / root cause

Prometheus chart profiles produce curated, well-defined charts, but those charts have no metric metadata, so they are absent from the integrations catalog and generated docs.

  • src/go/plugin/go.d/collector/prometheus/metadata.yaml has 160 per-exporter <<: *module entries, but all inherit scopes: [ ] from the base anchor (metadata.yaml:402). There is
    no haproxy entry.
  • The haproxy profile (config/go.d/prometheus.profiles/default/haproxy.yaml) renders 92 curated charts under prometheus.haproxy.* (e.g. prometheus.haproxy.frontend_status), none
    of which are documented.
  • azure_monitor already implements the "one collector → many pages" shape, but its per-component scopes are hand-written (azure_monitor/metadata.yaml, ~10k lines). Hand-writing per
    profile does not scale and drifts from the profile YAML, which already declares every chart's context, title, units, and dimensions.

Clean end state

A generator reads a Prometheus profile YAML and emits its metrics.scopes, wired into the integrations generation pipeline so each profile yields its own integration page
automatically — the azure_monitor model (per-component <<: *module entry with its own monitored_instance + metrics.scopes), but generated from the profile instead of
hand-written.

  • The profile YAML is the single source of truth; metadata cannot drift; every future profile gets a documented page for free.
  • haproxy is the proof of concept: a prometheus-haproxy integration with monitored_instance: HAProxy and generated scopes for all 92 curated charts, producing a generated HAProxy
    page with full metrics docs.

Acceptance criteria

  • A generator maps a profile YAML → metrics.scopes:
    • one scope per top-level template group; scope labels from that group's chart_defaults.instances.by_labels (inherited by nested groups);
    • one metric per curated chart: name = rendered context prometheus.<context_namespace>.<context>, description = chart title, unit = chart units, chart_type = chart type
      (default line), dimensions from dimension names (a dimension per <label> for name_from_label).
  • The generator is integrated into the integrations generation pipeline (integrations/gen_integrations.py and friends), not a manual side-step; re-running generation is idempotent.
  • A prometheus-haproxy integration entry is produced with monitored_instance: HAProxy + the generated scopes; the generated .md lists the curated metrics.
  • Output validates against the integrations metadata schema; markdown / check_collector_taxonomy.py checks pass.
  • A test guards the generator against charttpl profile-schema drift (nested groups, name_from_label, instances.by_labels).

Category

follow-up from prior work

Scope boundaries

In scope:

  • the profile-YAML → metrics.scopes generator;
  • its integration into the integrations generation pipeline;
  • the haproxy PoC integration page.

Validation

  • Run the generator on haproxy.yaml; diff emitted scopes against the 92 charts (count + spot-check the label-split charts: status by state, http responses by code).
  • Run the integrations pipeline and confirm the HAProxy page renders the metrics section.
  • Schema validation against integrations/schemas.

Risks / compatibility

  • Context composition: the generator assumes the default rendered prefix prometheus.<context_namespace>.<context>; the collector app option can change the namespace at runtime — stock metadata uses the default.
  • The generator must track the charttpl profile schema; the schema-drift test above is the guard.
  • The 160 existing exporter entries must stay unaffected (additive: only the haproxy entry + its generated scopes).
Ngôn ngữ chính
Go
Star
80.6k
Fork
6.6k
Merge trung bình
15 giờ 35 phút
Pull request đã merge (30 ngày)
305

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của netdata/netdata

Tất cả issue của netdata/netdata

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.