From b6fc10b0f574a55ae17bad8b8034d2eea0c83522 Mon Sep 17 00:00:00 2001 From: hazel-shen Date: Sat, 4 Jul 2026 11:35:32 +0800 Subject: [PATCH] feat(prometheus): add OPA scrape job and 5s interval for agent-governance - agent-governance job: override scrape_interval to 5s (global is 10s, worst-case 20s wait with dashboard refresh is too slow for live demo) - Add opa job scraping host.docker.internal:8181 for native OPA metrics including decision latency histograms --- observability/prometheus.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/observability/prometheus.yml b/observability/prometheus.yml index 04ae992..e496e26 100644 --- a/observability/prometheus.yml +++ b/observability/prometheus.yml @@ -24,10 +24,16 @@ scrape_configs: # Agent Governance Demo:scrape Pushgateway(Demo CLI push 進來的 counter) - job_name: "agent-governance" + scrape_interval: 5s honor_labels: true static_configs: - targets: ["host.docker.internal:9091"] + # OPA server 原生 /metrics(含決策延遲 histogram) + - job_name: "opa" + static_configs: + - targets: ["host.docker.internal:8181"] + # - job_name: "redis" # static_configs: # - targets: ["redis_exporter:9121"]