Overview
Query logs, metrics, and traces from SigNoz via the Query Range API. OpenSRE usesPOST /api/v5/query_range for query_signoz_logs, query_signoz_metrics, and query_signoz_traces. Configure SIGNOZ_URL and SIGNOZ_API_KEY (service account key).
Prerequisites
- A running SigNoz instance (Cloud, self-hosted, or local Docker)
- A SigNoz service account API key (see Credentials)
Setup
Option 1: Interactive CLI
Option 2: Environment variables
Local Docker quick start
If you already run SigNoz, skip to credentials and env setup above.bash runs whatever that URL currently serves, with your
shell’s privileges. If that’s a concern for your environment, download and verify a
pinned release instead (SigNoz/foundry on GitHub publishes a checksums file with every
release):
darwin_arm64 for your platform (linux_amd64, linux_arm64, etc.) and use
sha256sum in place of shasum -a 256 on Linux.
foundryctl cast validates the environment, generates the Docker Compose files under
pours/, and starts every container in one step. Serves the UI and API on
http://localhost:8080 (not 3301).
Credentials
In SigNoz: Settings → Service Accounts → create a service account → Keys → Add Key. Copy the key (shown once).Investigation tools
When
alert_source is signoz, OpenSRE auto-seeds these three tools before the ReAct loop.
Supported metrics (V1)
You can also pass any raw metric name known to SigNoz.
For latency percentiles (p95/p99), prefer
query_signoz_traces.
Verify
/api/v2/metrics, /api/v5/query_range).
Troubleshooting
Security
- Use a dedicated SigNoz service-account key with the minimum permissions needed for query access.
- Store
SIGNOZ_API_KEYin.envor your secret manager — not in source control. - Protect
POST /investigatewithOPENSRE_ALERT_LISTENER_TOKENon any non-loopback gateway.
Extras
Webhook / gateway trigger
SigNoz can emit Prometheus-style webhook payloads. The OpenSRE gateway does not accept a raw SigNoz webhook body as-is. Synchronous investigations use:InvestigateRequest:
Include
alert_source: "signoz" inside raw_alert (or set fields the pipeline can resolve to SigNoz) so auto-seed and tool relevance apply. Auth: set OPENSRE_ALERT_LISTENER_TOKEN and send Authorization: Bearer <token>; if unset, only loopback callers are accepted. See API.
Example (map or wrap your SigNoz notification into this shape):
/investigate with an unmodified SigNoz payload will fail validation (raw_alert required).
API reference
- Endpoint:
POST {SIGNOZ_URL}/api/v5/query_range - Auth header:
SigNoz-Api-Key: <YOUR_API_KEY> - Validation probe:
GET {SIGNOZ_URL}/api/v2/metrics
Local verification recipe
Verified live against a real local SigNoz stack (via Foundry, above). Send some real telemetry first — an empty stack proves connectivity, not that the tools return data:opensre integrations verify checks a saved store record before env vars, and
opensre investigate only falls through to env vars when the store has no records at
all — any existing record, for any service, blocks env-var resolution entirely. Point
OPENSRE_INTEGRATIONS_STORE_PATH at a path inside a fresh empty directory before
verifying, so a real saved record can’t shadow the SIGNOZ_* vars above for either
command, and your real config is never read or written: