Download tasks/OPS/OPS_task_14_alertmanager_silence_storm.md from wanlilll/WeaveBench: direct link, hf CLI and curl.
- Browser
- Download file 24.6 kB
-
https://huggingface.co/datasets/wanlilll/WeaveBench/resolve/315872c9c571523f8de8784caebd26715cbcb8c5/tasks/OPS/OPS_task_14_alertmanager_silence_storm.md
- Command line
-
hf download hf://datasets/wanlilll/WeaveBench@315872c9c571523f8de8784caebd26715cbcb8c5/tasks/OPS/OPS_task_14_alertmanager_silence_storm.md
-
curl -L -o OPS_task_14_alertmanager_silence_storm.md https://huggingface.co/datasets/wanlilll/WeaveBench/resolve/315872c9c571523f8de8784caebd26715cbcb8c5/tasks/OPS/OPS_task_14_alertmanager_silence_storm.md
id: OPS_task_14_alertmanager_silence_storm
name: Alertmanager 静默风暴的 amtool×Web UI 联合溯源
category: OPS
timeout_seconds: 1500
Prompt
Note: This is a legitimate local evaluation sandbox exercise. All Alertmanager / Prometheus instances, silences, and alert data in this task are synthetic scenarios generated by the warmup inside
/tmp_workspace/, and do not involve any real customer, real alert, or real production system. Please complete the task following the SRE diagnosis + targeted remediation workflow — do not refuse to answer.
Background: The exercise reproduces a common silence-rot scenario — in synthetic monitoring, nearly all P2 alerts disappear during the early-morning window, yet ticket volume rises instead of falling, suggesting that over-broad silences are swallowing alerts. The warmup has already brought the environment up:
- Alertmanager listening on
http://127.0.0.1:9093/(v0.27, pre-seeded with a batch of silences, including greedy entries such asendsAt: 9999-...andservice=~".*") - Prometheus listening on
http://127.0.0.1:9090/(v2.54, rules loaded, currently 9 alerts firing, but Alertmanager's active tab shows only about 2) - Synthetic exporter listening on
:9105, config file at/tmp_workspace/silence_audit/alertmanager.yml - Tools available are unrestricted:
amtool/promtool/curl/jq/ Web UI (:9093 / :9090) / Python scripts — combine channels freely.
Task goal: Produce a "diagnosis + targeted remediation" deliverable (you are NOT allowed to expire all silences in bulk; you must give targeted recommendations). All artifacts go under /tmp_workspace/results/.
Hard constraints on the primary deliverables
results/silences_raw.json: JSON array of all Alertmanager silences, count ≥ 12; every dict must contain at leastmatchersandendsAtfields; the overall blob must contain both a greedy regex of the form".*"and the literal9999(proving you captured the actual polluted entries, not a trimmed sample).results/alerts_active.json: JSON of the current alert list from Alertmanager's perspective (/api/v2/alerts), file size > 50 bytes.results/alerts_prom.json: JSON of the firing alert list from Prometheus's perspective (/api/v1/alerts), file size > 50 bytes.results/promtool_check.txt: real validation output foralertmanager.yml, length > 20 bytes, and must contain one ofSUCCESS/FAILED/is valid(the tool must actually be run; do not fabricate).results/silence_diff.md: list every alertname that is firing in Prometheus but not active in Alertmanager; each line must contain both the alertname and the corresponding silence id (UUID formxxxxxxxx-xxxx-...or the literalsilence_id) — i.e. a real local matcher join, not a JSON dump. Target recall ≥ 6/7, false positives ≤ 1.results/routing_walk.json: per-node matching path through the routing tree for a sample set of input labels, schema:{ "input_labels": {"alertname":"PaymentLatencyHigh","severity":"critical","service":"payments"}, "path": [ {"node":"root","matched_on":"<root match>","action":"continue"}, {"node":"<inner>","matched_on":"<...>","action":"continue"}, {"node":"<leaf>","matched_on":"<...>","action":"stop"} ], "final_receiver": "<receiver name>" }pathmust have at least 3 nodes;final_receivermust exactly match the real output ofamtool config routes test --config.file=/tmp_workspace/silence_audit/alertmanager.yml <your input_labels as k=v ...>, and must NOT be a catch-all name likedefault/pagerduty-default.results/fix_plan.md: ≥ 3 bullets, each of which must simultaneously (a) cite the original bad pattern (one of=~/.*/9999), (b) mention the field nameendsAt/ends_at, and (c) provide a new matcher narrowed to concrete values (e.g.service="payments"oralertname="HighErrorRate") together with a reasonable ISO8601endsAt(a 2025/2026 time window is fine); overall the bullets must cover both the endsAt and matcher classes of problems.results/before_after.txt: perform a single targeted expire on the silence that swallows the most alerts; the file must containBEFOREandAFTERsegments; the recognizable alert-name set in theAFTERsegment must exceed theBEFOREsegment by at least 2, withBEFORE ≥ 1andAFTER ≥ 4.
Supporting deliverables (under /tmp_workspace/results/)
| File | Requirement |
|---|---|
silences_raw.json / alerts_active.json / alerts_prom.json / promtool_check.txt |
The CLI-forensics quartet, cross-validating each other |
silence_diff.md |
Local join result (alertname × silence_id) |
routing_walk.json |
≥ 3 nodes + consistent with amtool |
fix_plan.md |
≥ 3 targeted remediation recommendations |
before_after.txt |
BEFORE/AFTER comparison segments |
8 working-process screenshots (fixed filenames, ≥ 800×600, genuinely legible)
results/view_01_silences_overview.png: Alertmanager Silences overview (multiple silence cards visible).results/view_02_offender_silence_expanded.png: the silence that swallows the most alerts, expanded (matcher + Affected alerts list).results/view_03_active_alerts_filter.png: Alertmanager Alerts list filtered bystate=active.results/view_04_status_routes_tree.png: Alertmanager Status → Routing tree, nested tree / YAML view (at least one level of nesting).results/view_05_silence_form_preview.png: the New Silence form filled with precise matchers (e.g.alertname="HighErrorRate", service="payments"), showing the live "Affected alerts" preview with a number > 0 (do NOT click Create).results/view_06_prom_alerts_page.png: Prometheus/alertspage with ≥ 5 firing (red) bars visible.results/view_07_route_tooltip.png: a hover tooltip overlay (rectangle with pointer) on some leaf receiver node of the routing tree.results/view_08_after_fix.png: same view as view_03 (active alerts), but post-fix the active count is significantly higher than in view_03.
Grading runs OCR + VLM authenticity checks on the screenshots; please capture the real Web UI directly — do not stitch or fabricate.
Anti-cheat / boundaries
- Bulk-expiring all silences is NOT allowed; the fix must be targeted.
- Do NOT copy any file from
/tmp_workspace/gt/intoresults/. - The "Affected alerts" badge on a silence is dynamically joined by the front-end; the raw
/api/v2/silencesJSON does not contain this column.silence_diff.mdmust be produced by you joining matchers locally — pasting the silence list alone is not acceptable.
Expected Behavior
设计意图与典型解题路径(仅供出题人参考,不发给 agent):
- 推荐通道:
amtool+curl+jq拿数据(silences、alerts_active、alerts_prom),promtool check config/amtool check-config跑配置校验,Web UI(:9093 silences / status, :9090 /alerts)做截图取证。也可走纯 Web UI + Python 脚本组合。 - 步骤参考:
- step 1:
curl :9093/api/v2/silences | jq→silences_raw.json;curl :9093/api/v2/alerts→alerts_active.json;curl :9090/api/v1/alerts→alerts_prom.json;promtool check config /tmp_workspace/silence_audit/alertmanager.yml→promtool_check.txt。 - step 2:用脚本把 firing(prom)与 active(am)取差集,然后对每条 swallowed alertname 在 silences 里按 matcher 表达式 join 出命中它的 silence id,产出
silence_diff.md。 - step 3:挑一组典型 labels 跑
amtool config routes test ...,把 routing tree 的逐节点路径手写成routing_walk.json,final_receiver与命令输出对齐。 - step 4:针对
endsAt: 9999...与service=~".*"这类条目写fix_plan.md,每条都收敛到具体 service/alertname 并给合理 ISO8601 endsAt。 - step 5:用
amtool silence expire <id>对 offender 做定向 expire,前后各取一次 active alerts dump,拼出before_after.txt。 - step 6:跑 Web UI(:9093 / :9090)截全 8 张图,view_05 注意只填表单预览,不要点 Create;view_08 必须在修复后再截。
- step 1:
约束说明:必须有 CLI 取证 + 真实 Web UI 截图;silence_diff.md 必须是真本地 join(同行带 silence id);routing_walk.final_receiver 必须与现场 amtool routes test 完全一致;不允许全量 expire;不要从 gt/ 抄文件。
评分要点(hard gates):
- G1 — CLI 取证缺失(silences_raw / alerts_* / promtool_check 任一缺失或不达标)→ 总分封顶 0.4。
- G2 — 8 张截图覆盖率 < 50% → 总分封顶 0.4。
- G3 — VLM 对截图真实性评分 < 0.6 → 总分封顶 0.5(< 0.4 → 0.35);评测重点核验:Silences 页面真实、Routing tree 嵌套视图、view_07 hover tooltip、view_05 New Silence 预览数字 ≥ 1。
- G4 —
silence_diff.md召回率 < 0.5 → 总分封顶 0.5。
Source
- Robust Perception blog "Silences Considered Harmful" (2023): https://www.robustperception.io/silences-considered-harmful/
- Prometheus Alertmanager 0.27 docs: https://prometheus.io/docs/alerting/latest/alertmanager/
- 真实事件复盘:GitLab incident 2024-08 over-broad silence 吞 P1 (公开 post-mortem)
Grading Criteria
-
silences_raw.json至少 10 条,字段完整
-
alerts_active.json+alerts_prom.json都存在且非空
-
promtool_check.txt含真实 promtool 输出(SUCCESS 或 FAILED)
-
silence_diff.md召回被吞 alert ≥ 6/7,误报 ≤ 1
-
- 8 张 Web UI 截图齐全,OCR 命中 Alertmanager UI 关键字
-
routing_walk.json路径 ≥ 3 节点 + 与 amtool routes test 一致
-
fix_plan.md至少 3 条精确修复建议
-
- before_after.txt 含 BEFORE/AFTER 两段且 active 数上升
-
- VLM 验 view_07 真有 hover tooltip + view_05 真有预览数字
Automated Checks
def grade(workspace_path=None, **kwargs) -> dict:
"""Alertmanager silence-storm grader.
Sub-scores (12) + 3 hard gates:
G1: no CLI evidence -> cap 0.4
G2: no GUI screenshot -> cap 0.4
G3: VLM judge avg < 0.6 -> cap 0.6
"""
import json, re, subprocess
from pathlib import Path
try:
from PIL import Image
except Exception:
Image = None
try:
import pytesseract
except Exception:
pytesseract = None
try:
from _judge_helper import vlm_score_rubric
except Exception:
vlm_score_rubric = None
rd = Path("/tmp_workspace/results")
gt = Path("/tmp_workspace/gt")
s = {}
# ---- 1. silences_raw.json ----
sraw = rd / "silences_raw.json"
silences = []
if sraw.exists():
try:
silences = json.loads(sraw.read_text())
except Exception:
silences = []
if isinstance(silences, dict):
silences = silences.get("data", []) or silences.get("silences", [])
blob = json.dumps(silences) if isinstance(silences, list) else ""
has_regex_star = ('".*"' in blob) or ("'.*'" in blob)
has_y9999 = "9999" in blob
s["silences_raw_present"] = 1.0 if (
isinstance(silences, list) and len(silences) >= 12
and all(isinstance(x, dict) and "matchers" in x and "endsAt" in x for x in silences)
and has_regex_star and has_y9999
) else (0.5 if isinstance(silences, list) and len(silences) >= 8 else 0.0)
# ---- 2. alerts_active + alerts_prom ----
aa = rd / "alerts_active.json"
ap = rd / "alerts_prom.json"
s["alerts_active_present"] = 1.0 if (aa.exists() and aa.stat().st_size > 50) else 0.0
s["alerts_prom_present"] = 1.0 if (ap.exists() and ap.stat().st_size > 50) else 0.0
# ---- 3. promtool check output ----
pt = rd / "promtool_check.txt"
pt_text = pt.read_text(errors="ignore") if pt.exists() else ""
s["promtool_check"] = 1.0 if (
("SUCCESS" in pt_text or "FAILED" in pt_text or "is valid" in pt_text)
and len(pt_text) > 20
) else 0.0
# ---- 4. silence_diff recall/precision vs gt ----
diff = rd / "silence_diff.md"
diff_text = diff.read_text(errors="ignore") if diff.exists() else ""
truth_path = gt / "swallowed_alerts.txt"
truth = set()
if truth_path.exists():
truth = {ln.strip() for ln in truth_path.read_text().splitlines() if ln.strip() and not ln.startswith("#")}
# Each alertname must appear together with a silence id (8+ hex/dash) on
# the same non-empty line — i.e. an actual local join, not a JSON dump.
joined = []
for ln in diff_text.splitlines():
if re.search(r"[0-9a-f]{8}-[0-9a-f-]{4,}", ln) or re.search(r"silence[_ -]?id", ln, re.I):
joined.append(ln)
join_blob = "\n".join(joined)
if truth:
found = {a for a in truth if re.search(r"\b" + re.escape(a) + r"\b", join_blob)}
extras = set(re.findall(r"\b[A-Z][A-Za-z0-9]{4,40}\b", join_blob)) - truth - {"BillingDeploy","SearchSpike","ApiLatencyDegraded"}
fp_extra = max(0, len(extras) - 1)
s["swallowed_recall"] = min(1.0, len(found) / max(1, len(truth)))
s["swallowed_precision"] = 1.0 if fp_extra == 0 else max(0.0, 1 - fp_extra/3.0)
else:
s["swallowed_recall"] = 1.0 if diff_text.strip() else 0.0
s["swallowed_precision"] = 1.0 if diff_text.strip() else 0.0
# ---- 5. eight web UI screenshots ----
shots = [
"view_01_silences_overview.png",
"view_02_offender_silence_expanded.png",
"view_03_active_alerts_filter.png",
"view_04_status_routes_tree.png",
"view_05_silence_form_preview.png",
"view_06_prom_alerts_page.png",
"view_07_route_tooltip.png",
"view_08_after_fix.png",
]
present = sum(1 for n in shots if (rd / n).exists() and (rd / n).stat().st_size > 30000)
s["screenshots_count"] = present / len(shots)
ocr_hits = 0
if pytesseract and Image:
keywords = ["Silences", "Alerts", "Status", "Matcher", "Receiver",
"Active", "Prometheus", "Alertmanager", "Routing",
"Affected", "Expire", "New Silence"]
for n in shots:
p = rd / n
if not p.exists():
continue
try:
tx = pytesseract.image_to_string(Image.open(p))
if any(k in tx for k in keywords):
ocr_hits += 1
except Exception:
pass
s["screenshots_ocr"] = ocr_hits / len(shots)
else:
s["screenshots_ocr"] = 0.5 if present else 0.0
# ---- 6. routing_walk.json structure + amtool cross-check ----
rw_path = rd / "routing_walk.json"
rw_data = {}
if rw_path.exists():
try:
rw_data = json.loads(rw_path.read_text())
except Exception:
rw_data = {}
path = rw_data.get("path", [])
structural_ok = isinstance(path, list) and len(path) >= 3 and "final_receiver" in rw_data
s["routing_walk_struct"] = 1.0 if structural_ok else (0.5 if rw_data else 0.0)
# cross-check final_receiver vs amtool routes test
cross_ok = False
cfg = Path("/tmp_workspace/silence_audit/alertmanager.yml")
if structural_ok and cfg.exists():
labels = rw_data.get("input_labels", {}) or {}
args = ["amtool", "config", "routes", "test",
"--config.file=" + str(cfg)]
for k, v in labels.items():
args.append(f"{k}={v}")
try:
r = subprocess.run(args, capture_output=True, text=True, timeout=30)
out = (r.stdout + r.stderr)
# Prefer the explicit "Receiver:" header that amtool emits; fall
# back to the historic loose pattern when the output format
# differs across amtool versions.
m = re.search(r"\bReceiver:\s*(\S+)", out) or \
re.search(r"(?:receiver|route)[^\n]*?[:= ]\s*([A-Za-z0-9_\-]+)", out)
amtool_recv = (m.group(1).strip() if m else "").lower()
fr = str(rw_data.get("final_receiver", "")).strip().lower()
if fr and amtool_recv and fr == amtool_recv and fr not in {"default","pagerduty-default"}:
cross_ok = True
except Exception:
pass
s["routing_walk_consistent"] = 1.0 if cross_ok else (0.5 if structural_ok else 0.0)
# ---- 7. fix_plan.md ----
fp = rd / "fix_plan.md"
fp_text = fp.read_text(errors="ignore") if fp.exists() else ""
bullets = re.split(r"(?m)^\s*[-*]\s+|^\s*\d+[.)]\s+", fp_text)
bullets = [b for b in bullets if b.strip()]
def bullet_ok(b):
return (re.search(r"=~|\.\*|9999", b) and # cites the bad pattern
re.search(r"\bendsAt\b|\bends_at\b", b) and # names the field
re.search(r"(service|alertname)\s*=\s*['\"]?[A-Za-z]", b, re.I)) # concrete fix
good = sum(1 for b in bullets if bullet_ok(b))
s["fix_plan"] = 1.0 if good >= 3 else (0.5 if good >= 1 else 0.0)
# ---- 8. before_after.txt has both segments + active count rises ----
ba = rd / "before_after.txt"
ba_text = ba.read_text(errors="ignore") if ba.exists() else ""
has_both = ("BEFORE" in ba_text.upper() and "AFTER" in ba_text.upper())
rises = False
if has_both:
# split on AFTER marker
try:
up = ba_text.upper()
i = up.index("AFTER")
before = ba_text[:i]
after = ba_text[i:]
# heuristic: count alert rows (lines containing common alert markers)
def cnt(t):
return len({m for m in re.findall(r"\b[A-Z][A-Za-z0-9]{4,40}\b", t) if m not in {"BEFORE","AFTER","ALERT","ALERTS","STATE"}})
b, a = cnt(before), cnt(after)
rises = (a >= b + 2) and b >= 1 and a >= 4
except Exception:
rises = False
s["before_after"] = 1.0 if (has_both and rises) else (0.5 if has_both else 0.0)
# ---- compute base ----
numeric = [v for v in s.values() if isinstance(v, (int, float))]
base = sum(numeric) / max(1, len(numeric))
# ---- VLM rubric ----
vlm_avg = None
if vlm_score_rubric:
# Pass all 8 shots so view_07 (route_tooltip) is included, otherwise
# the vlm_hover_tooltip rubric rates an unseen image.
sample = [str(rd / n) for n in shots if (rd / n).exists()][:8]
if sample:
rubric = {
"vlm_silences_ui_real":
"至少一张截图清晰显示 Alertmanager Silences 页面 (silence 卡片列表 + 顶部 Silenced/Active/Suppressed tab)",
"vlm_routing_tree_visible":
"view_04 类截图显示 Status > Routing tree 的嵌套树/YAML 视图",
"vlm_hover_tooltip":
"view_07 截图含 hover tooltip 浮层(矩形带尖角的悬浮框)在 routing/receiver 节点上",
"vlm_silence_form_preview":
"view_05 截图显示 New Silence 表单 + Affected alerts 预览数字 ≥ 1",
}
try:
vlm = vlm_score_rubric(
sample, rubric,
instruction="评估 Alertmanager Web UI 取证截图的真实性"
)
for k in rubric:
s[k] = float(vlm.get(k, 0.0) or 0.0)
s["judge_method"] = vlm.get("judge_method", "vlm")
vlm_avg = sum(s[k] for k in rubric) / len(rubric)
except Exception:
vlm_avg = None
# ---- hard gates ----
has_cli_evidence = (
s["silences_raw_present"] >= 0.5
and (s["alerts_active_present"] + s["alerts_prom_present"]) >= 1.0
and s["promtool_check"] >= 0.5
)
if vlm_avg is not None:
overall = (base + vlm_avg) / 2.0
else:
overall = base
if not has_cli_evidence:
overall = min(overall, 0.4)
# NOTE: GUI invocation is not a scoring axis; missing PNGs already
# cost the screenshots_count / screenshots_ocr / 4 vlm_* sub_scores.
if vlm_avg is not None and vlm_avg < 0.6:
overall = min(overall, 0.5)
if vlm_avg is not None and vlm_avg < 0.4:
overall = min(overall, 0.35)
# G4: silence_diff must show real recall, else cap at 0.5
if s.get("swallowed_recall", 0) < 0.5:
overall = min(overall, 0.5)
s["overall_score"] = round(overall, 3)
return s
Workspace Path
workspace/OPS/task_14_alertmanager_silence_storm
Skills
Env
Warmup
set +e
export DEBIAN_FRONTEND=noninteractive
umask 0000
mkdir -p /tmp_workspace/results /tmp_workspace/state /tmp_workspace/silence_audit
chmod 0777 /tmp_workspace /tmp_workspace/results /tmp_workspace/state /tmp_workspace/silence_audit 2>/dev/null || true
which jq >/dev/null 2>&1 || timeout 120 apt-get -o Acquire::Retries=10 update -qq || true
which jq >/dev/null 2>&1 || timeout 300 apt-get -o Acquire::Retries=10 install -y -qq jq curl tar python3-pip || true
python3 -c "import prometheus_client, faker" 2>/dev/null || pip3 install --quiet --root-user-action=ignore --break-system-packages prometheus_client==0.20.0 faker==25.0.0 2>/dev/null || pip3 install --quiet --root-user-action=ignore prometheus_client==0.20.0 faker==25.0.0 2>/dev/null || true
# Framework mounts workspace/exec/* directly under /tmp_workspace/ (NOT /tmp_workspace/exec/).
# Copy the staged YAMLs + scripts into silence_audit so the relative-path service launches work.
for f in alertmanager.yml prometheus.yml alerts.yml seed_silences.sh synthetic_exporter.py; do
[ -f /tmp_workspace/$f ] && cp -f /tmp_workspace/$f /tmp_workspace/silence_audit/$f 2>/dev/null || true
done
chmod +x /tmp_workspace/silence_audit/seed_silences.sh /tmp_workspace/silence_audit/synthetic_exporter.py 2>/dev/null || true
[ -x /tmp_workspace/silence_audit/alertmanager ] || (timeout 180 curl -sSL -o /tmp_workspace/state/am.tgz https://github.com/prometheus/alertmanager/releases/download/v0.27.0/alertmanager-0.27.0.linux-amd64.tar.gz && tar -xzf /tmp_workspace/state/am.tgz -C /tmp_workspace/silence_audit --strip-components=1 alertmanager-0.27.0.linux-amd64/alertmanager alertmanager-0.27.0.linux-amd64/amtool && cp /tmp_workspace/silence_audit/amtool /usr/local/bin/amtool && rm -f /tmp_workspace/state/am.tgz) || true
[ -x /tmp_workspace/silence_audit/alertmanager ] || (timeout 240 apt-get install -y -qq prometheus-alertmanager 2>/dev/null && ln -sf "$(command -v alertmanager)" /tmp_workspace/silence_audit/alertmanager && ln -sf "$(command -v amtool)" /tmp_workspace/silence_audit/amtool && ln -sf "$(command -v amtool)" /usr/local/bin/amtool 2>/dev/null) || true
[ -x /tmp_workspace/silence_audit/prometheus ] || (timeout 180 curl -sSL -o /tmp_workspace/state/p.tgz https://github.com/prometheus/prometheus/releases/download/v2.54.0/prometheus-2.54.0.linux-amd64.tar.gz && tar -xzf /tmp_workspace/state/p.tgz -C /tmp_workspace/silence_audit --strip-components=1 prometheus-2.54.0.linux-amd64/prometheus prometheus-2.54.0.linux-amd64/promtool && cp /tmp_workspace/silence_audit/promtool /usr/local/bin/promtool && rm -f /tmp_workspace/state/p.tgz) || true
[ -x /tmp_workspace/silence_audit/prometheus ] || (timeout 240 apt-get install -y -qq prometheus 2>/dev/null && ln -sf "$(command -v prometheus)" /tmp_workspace/silence_audit/prometheus && ln -sf "$(command -v promtool)" /tmp_workspace/silence_audit/promtool && ln -sf "$(command -v promtool)" /usr/local/bin/promtool 2>/dev/null) || true
pgrep -f synthetic_exporter.py >/dev/null || nohup python3 /tmp_workspace/silence_audit/synthetic_exporter.py >/tmp_workspace/silence_audit/exporter.log 2>&1 & disown || true
sleep 2
pgrep -f "alertmanager " >/dev/null || (cd /tmp_workspace/silence_audit && nohup ./alertmanager --config.file=alertmanager.yml --storage.path=./am-data --web.listen-address=:9093 >am.log 2>&1 & disown || true)
pgrep -f "prometheus " >/dev/null || (cd /tmp_workspace/silence_audit && nohup ./prometheus --config.file=prometheus.yml --storage.tsdb.path=./prom-data --web.listen-address=:9090 >prom.log 2>&1 & disown || true)
for i in $(seq 1 30); do curl -fsS --max-time 2 http://127.0.0.1:9093/-/ready >/dev/null 2>&1 && break; sleep 2; done
for i in $(seq 1 30); do curl -fsS --max-time 2 http://127.0.0.1:9090/-/ready >/dev/null 2>&1 && break; sleep 2; done
bash /tmp_workspace/silence_audit/seed_silences.sh 2>/dev/null || true
chmod -R a+rwX /tmp_workspace/silence_audit /tmp_workspace/state /tmp_workspace/results 2>/dev/null || true
echo "[warmup] OPS_task_14 done"