Monitoring
What to watch in an AgentShield deployment, how to start Prometheus and Grafana, and the signals that indicate a problem.
AgentShield gives you three sources of operational truth: health endpoints for orchestration, Prometheus metrics for trends and alerting, and security events for what agents did.
Start the monitoring stack
docker compose --profile app --profile observability up -d --build| Tool | URL | Notes |
|---|---|---|
| Grafana | http://127.0.0.1:3001 | User admin, password GRAFANA_ADMIN_PASSWORD (development default). The AgentShield dashboard is the home page |
| Prometheus | http://127.0.0.1:9090 | Scrapes every service on the Compose network. Keeps 15 days locally |
Service metrics ports are not published to the host; only Prometheus reaches them.
Golden signals
| Signal | Metric | Healthy looks like |
|---|---|---|
| Gateway traffic | rate(agentshield_gateway_http_requests_total[5m]) by route | Steady, matching agent activity |
| Gateway errors | 5xx share of gateway requests | Near zero |
| Gateway latency | agentshield_gateway_http_request_duration_seconds | Stable p95; dominated by database round trips |
| Decision mix | agentshield_gateway_decisions_total by outcome | Denies are expected but should not spike |
| Execution results | agentshield_gateway_executions_total by tool, result | Mostly completed |
| Adapter latency | agentshield_gateway_adapter_duration_seconds | Within tool deadlines |
| Analyzer availability | agentshield_gateway_analysis_total{status="unavailable"} | Near zero |
| Injection findings | agentshield_gateway_analysis_findings_total{rule_id=~"PI.*"} | Low, investigated |
| Event pipeline lag | agentshield_relay_outbox_oldest_seconds | Seconds, not minutes |
Shipped alerts
| Alert | Fires when | First check |
|---|---|---|
AgentShieldServiceDown | A service missed scrapes for 2 minutes | Container or pod status and logs |
GatewayServerErrors | Over 5% of gateway requests return 5xx for 5 minutes | PostgreSQL and Redis readiness |
GatewayCircuitOpen | An open circuit refused calls to a tool | The tool's upstream availability |
AnalyzerUnavailable | Over 10% of analyses unavailable for 10 minutes | Analyzer health, INTELLIGENCE_TIMEOUT, content size |
PromptInjectionSpike | More than 20 injection findings in 15 minutes | Alerts in the console; which tool and resource |
OutboxFallingBehind | Oldest unpublished event over 1 minute for 5 minutes | Relay logs, NATS availability |
OutboxUnreadable | The relay cannot read the outbox | Relay database connectivity and role |
EvidenceWritesFailing | Evidence bundles retried or dropped | Object storage availability and credentials |
No Alertmanager is configured by default; alerts appear in Prometheus and Grafana. Add an Alertmanager with your own receivers to notify people.
Health checks
| Service | Ready means |
|---|---|
| Gateway | PostgreSQL and Redis answer within one second |
| Control plane | PostgreSQL answers |
| Intelligence | Ruleset loaded |
| Event relay | PostgreSQL and NATS answer; oldest queued event under one minute |
Wire /health/live to liveness and /health/ready to readiness in your orchestrator. The Kubernetes manifests already do.
Per-organization monitoring
Prometheus deliberately has no tenant labels. For per-organization views, use the control plane:
- Overview in the console for agents, approvals, incidents, reliability, and event mix.
GET /api/v1/metrics/reliabilityfor per-tool calls, failures, success rate, and latency.GET /api/v1/eventsand the event stream for activity.- NATS consumers for streaming into your SIEM.
Was this page helpful?