[Workload]: metrics-emitter
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 45/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- go, kubernetes, prometheus
調査の方向性
まず、既存の cpu、memory、disk ワークロードの実装と、それらの Kubernetes Service 生成処理を探します。cloud-init と systemd のサービスがどのように定義されているかを確認し、提案されている avalanche コマンドとポート 9101 の Service ラベルをワークロードの規約と比較します。metrics-emitter VM が設定された Prometheus エンドポイントを公開し、その Service が ServiceMonitor または PodMonitor による検出をサポートすれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Workload Name
metrics-emitter
Workload Description
A workload that runs a Prometheus-compatible metrics endpoint inside a VM, exposing configurable gauges, counters, and histograms with tunable label cardinality and scrape-ready /metrics path. Produces sustained, realistic metric signals that monitoring partners can scrape via OpenShift's native ServiceMonitor/PodMonitor pipeline.
This is the missing link between virtwork's in-VM workloads and the Prometheus-based monitoring ecosystem on OpenShift. The current workloads (cpu, memory, disk, database) generate real system pressure, but monitoring partners need scrapeable application metrics — not just node-level signals. A metrics-emitter VM acts as a synthetic application that exposes the same kind of metric surface a real business application would: request duration histograms, active connection gauges, error counters, queue depth gauges — all with configurable cardinality to stress the partner's ingestion pipeline.
Tooling and Packages
- Tool:
avalanche(Prometheus metric load generator by Prometheus team) or a lightweight custom exporter avalancheflags:--metric-count=500 --label-count=10 --series-count=5 --port=9101 --value-interval=30- RPM packages: none —
avalancheis a single Go binary - systemd service command:
/usr/local/bin/avalanche --metric-count=500 --label-count=10 --series-count=5 --port=9101 - Exposes port 9101 (Prometheus metrics) via Kubernetes Service
- Configurable parameters: metric count, label count (cardinality), series count per metric, value change interval, port
VM Count Model
Single VM (like cpu, memory, disk)
Required Resources
- Kubernetes Service (for inter-VM communication)
- Persistent storage (DataVolume)
- Kubernetes Secret (for credentials or config)
- Additional CPU/memory beyond defaults
- GPU or special device passthrough
Cloud-Init Details
write_files:
- path: /etc/systemd/system/virtwork-metrics-emitter.service
content: |
[Unit]
Description=Virtwork Prometheus metrics emitter
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
ExecStart=/usr/local/bin/avalanche \
--metric-count=500 \
--label-count=10 \
--series-count=5 \
--port=9101 \
--value-interval=30
Restart=always
RestartSec=5
[Install]
WantedBy=multi-user.target
runcmd:
- curl -Lo /usr/local/bin/avalanche https://github.com/prometheus-community/avalanche/releases/download/v0.6.0/avalanche_0.6.0_linux_amd64.tar.gz
- tar -xzf /usr/local/bin/avalanche -C /usr/local/bin/
- chmod +x /usr/local/bin/avalanche
- systemctl enable --now virtwork-metrics-emitter.service
The Kubernetes Service should expose port 9101 with appropriate labels for ServiceMonitor discovery:
apiVersion: v1
kind: Service
metadata:
name: virtwork-metrics-emitter-0
labels:
app.kubernetes.io/managed-by: virtwork
virtwork/component: metrics-emitter
virtwork/metrics: "true"
spec:
ports:
- name: metrics
port: 9101
targetPort: 9101
selector:
# matches VM pod labels
Use Case
- Monitoring platform partners (Datadog, Dynatrace, Sysdig, Grafana Labs): Need scrapeable Prometheus endpoints from VMs to validate that their agents correctly discover, scrape, and ingest application-level metrics from KubeVirt VMs — not just node/kubelet metrics. High cardinality (many labels × many series) stresses ingestion pipelines and validates the partner's ability to handle metric volume at scale.
- Prometheus/Thanos/Mimir ecosystem partners: Need realistic scrape targets to validate long-term storage, compaction, and query performance against VM-sourced metrics. Configurable metric count and cardinality lets partners tune the load to match their customers' real-world profiles.
- OpenShift platform validation: Validates that the full Prometheus pipeline — ServiceMonitor discovery → scrape → remote write → partner product — works correctly when the scrape target is a KubeVirt VM rather than a pod. This exercises a code path that's distinct from container-based scraping and is less commonly tested.
- Capacity planning partners: Need predictable, tunable metric volume to validate alerting thresholds and dashboard rendering under load.
Additional Context
avalancheis maintained by the Prometheus community and designed specifically for this purpose: generating configurable Prometheus metric load. It's the standard tool for testing Prometheus-compatible backends.- The Kubernetes Service is critical — it enables OpenShift's ServiceMonitor to discover and scrape the VM's metrics endpoint through the standard Prometheus operator pipeline. This is what makes this workload uniquely valuable on OpenShift vs. a bare VM.
- Configurable parameters to expose via CLI/YAML:
metric-count(number of distinct metrics),label-count(labels per metric — controls cardinality),series-count(series per metric),value-interval(seconds between value changes),port. - Consider also generating a sample
ServiceMonitorCR in dry-run output to show partners how to wire up scraping. This isn't a virtwork-managed resource but a documentation/example artifact. - At 500 metrics × 5 series × 10 labels, a single VM produces ~2,500 time series — comparable to a moderately instrumented microservice. Scaling to 5,000+ metrics or 50+ labels tests high-cardinality ingestion.
- 主要言語
- Go
- スター
- 0
- フォーク
- 0
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドなし
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
opdev/virtwork のほかの issue
-
good first issue needs-triage size/L workload-request workload/variant
難易度 5/5 1週間以上 初心者へのやさしさ 45/100
-
needs-triage priority/awaiting-more-evidence size/XL workload-request workload/tier-2
難易度 5/5 1週間以上 初心者へのやさしさ 48/100
-
good first issue needs-triage size/XL workload-request workload/variant
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
-
needs-triage size/L workload-request workload/tier-3
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
-
[Workload]: windowsオープンneeds-triage size/XXL workload-request workload/tier-3
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
kind/engineering pulumi/pulumi-terraform Task Workflow Failure
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
pulumi/pulumi-terraform#1261 ·
メンテナーはふだん 1 日以内に返信
-
Controllers integration tests fail when port 8080 is in use対応中かも @noahnut が今日担当しました。 オープンarea/cluster-autoscaler kind/bug needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
kubernetes-sigs/cluster-autoscaler#236 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
MCP: `tasks_bulk_update` always fails with "Need at least one field" — the `fields` projection argument is stripped from non-read tools too対応中かも @tink-bot が今日担当しました。 オープンagent-processed area/api-v2 integration/inbound
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
go-vikunja/vikunja#4235 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
google/osv-scalibr#2503 ·
メンテナーはふだん 1 日以内に返信