prow-job-prometheus
БесплатноЗапускает вложенные скриптыНе проверенUse when you need in-cluster Prometheus metrics from a Prow CI job run — apiserver in-flight requests, etcd disk latency, node CPU/memory/disk, per-pod usage…
от openshift-eng★ 123 звезды на GitHubОб этом скилле
Prow Job Prometheus
Most OpenShift e2e prow jobs that use and reach the gather-extra step save the in-cluster Prometheus
TSDB. Loading it locally lets you run PromQL against the cluster as it was during the run.
This is the way to answer "what was the apiserver/etcd/node doing at the moment tests failed".
Use this skill when:
- Autodl or Sippy data points at a time window (high CPU, disruption, a burst of failures) and you need the underlying metrics.
- Debugging apiserver slowness, etcd latency, node resource exhaustion, or restarts in one run.
- Comparing the same metrics between a bad run and a good run.
These TSDB's can be quite large, so avoid bulk downloading when possible, this is for targeted investigations.
Prerequisites
- podman, to run Prometheus (and to build
walfixifgoisn't installed). On macOS the podman VM only mounts paths under/Users. The default cache~/.cache/prow-prometheusis fine, but/tmpfails withstatfs ... no such file or directory. - Python 3.9+.
- Roughly 2 GB of disk per replica (download plus extracted data).
- Artifacts come from the public
test-platform-results-publicbucket over anonymous HTTPS. Do not rungcloud auth loginor change the user's gcloud account to reach them. The bucket namedtest-platform-results(no-public) is private.
Where the snapshots are
<run>/artifacts/<step>/gather-extra/artifacts/metrics/
prometheus.tar.gz # replica prometheus-k8s-0 TSDB (prometheus.tar in older runs)
prometheus-k8s-1.tar.gz # replica prometheus-k8s-1 TSDB (prometheus-k8s-1.tar in older runs)
prometheus-tsdb-status.json # live head stats at gather time (series count, time range)
prometheus-targets.json # scrape targets and their health at gather time
job_metrics.json # a few precomputed queries
Both replicas scrape the same targets, so either works. The snapshot covers the whole run (install through gather), roughly 2–3 hours.
Step 1: Load the snapshot
SKILL_DIR="${CLAUDE_PLUGIN_ROOT}/skills/prow-job-prometheus"
python3 "$SKILL_DIR/load_snapshot.py" "<prow-job-url>"
The script:
- Finds the step with a
gather-extrasnapshot (pass--stepif several steps have one). - Downloads the replica 0 snapshot (
--replica 1for the other replica) into~/.cache/prow-prometheus/<build_id>/. - Extracts it safely and repairs the WAL with
walfix(see below). - Starts
quay.io/prometheus/prometheusin podman on the first free port from 9090, waits until ready. - Prints the URL, the data time range, and how many series loaded compared with the live server.
If fewer than about 80% of the live series loaded, try the other replica. Even at ~98%, the
series lost to corruption can be an entire target, e.g. one etcd member. If a target you need
shows no data (check count by (instance) (count_over_time(<metric>[4h]))), load the other
replica on another port (--replica 1 --port 9091) and query it with promql.py --url.
Why the WAL repair matters. The snapshot is copied from a running Prometheus, so the WAL
almost always has a corrupt page. Prometheus's built-in repair handles that by deleting
every WAL segment after the corruption and only logging a warning. A naively loaded snapshot
can silently lose 90%+ of its series, e.g. two of three apiservers or etcd members appear to
have no data. walfix keeps every record whose checksum verifies and skips only the corrupt
fragments, typically recovering ~98% of series. Never load a raw snapshot without it.
If you see Deleting all segments newer than corrupted segment in podman logs, the WAL was
not repaired.
Step 2: Find the time window
Metrics timestamps are UTC. Anchor the window on something concrete from the run:
- Test failure times from junit (
start_time/end_time) or the run's intervals files. - The autodl
node_cpu_usage_timelinefor the run, whose first sample is about the start of e2e. - A scrape gap:
up == 0or a missing sample means the target stopped responding.
Step 3: Query
python3 "$SKILL_DIR/promql.py" '<promql>' --url http://localhost:9090 \
--start 2026-10-13T14:30:00Z --end 2026-10-13T14:56:00Z --step 60 --label instance
python3 "$SKILL_DIR/promql.py" '<promql>' --time 2026-10-13T14:43:00Z # instant query
It prints a time-by-series table (columns ordered by peak value, --max-series to widen).
The Prometheus UI at the printed URL also works for ad hoc exploration.
PromQL cookbook
Apiserver load and responsiveness
| Question | Query |
|---|---|
| In-flight requests per apiserver | sum by (instance) (apiserver_current_inflight_requests{job="apiserver"}) |
| Read vs mutating in flight | sum by (request_kind) (apiserver_current_inflight_requests{job="apiserver"}) |
| APF executing by priority level | sum by (priority_level) (apiserver_flowcontrol_current_executing_requests) |
| APF queued requests | `sum by (priority_level) (apiserver |
Установить prow-job-prometheus в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл prow-job-prometheus?
Use when you need in-cluster Prometheus metrics from a Prow CI job run — apiserver in-flight requests, etcd disk latency, node CPU/memory/disk, per-pod usage, restarts — by downloading the run's Prometheus snapshot, repairing it, and querying it locally with PromQL
Как установить скилл prow-job-prometheus?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл prow-job-prometheus запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
ci-review
The scan that the plugin's GitHub Action runs.
от Anthropicazure-static-web-apps
Helps create, configure, and deploy Azure Static Web Apps using the SWA CLI. Use when deploying static sites to Azure, setting up SWA local development…
от GitHubai-ready
Make any repo AI-ready — analyzes your codebase and generates AGENTS.md, copilot-instructions.md, CI workflows, issue templates, and more. Mines your PR…
от GitHubaws-cdk-python-setup
Setup and initialization guide for developing AWS CDK (Cloud Development Kit) applications in Python. This skill enables users to configure environment…
от GitHub