Skip to main content

Overview

Query logs, metrics, and traces from SigNoz via the Query Range API. OpenSRE uses POST /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

Setup prompts for SigNoz URL and API key only.

Option 2: Environment variables

Local Docker quick start

If you already run SigNoz, skip to credentials and env setup above. For a local stack, use the official SigNoz Docker setup.
Local Docker serves the UI and API on http://localhost:8080 (not 3301).

Credentials

In SigNoz: Settings → Service Accounts → create a service account → KeysAdd 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

Expected verify output mentions the SigNoz Query API (/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_KEY in .env or your secret manager — not in source control.
  • Protect POST /investigate with OPENSRE_ALERT_LISTENER_TOKEN on 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:
with a JSON body matching 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):
In SigNoz, create a Webhook notification channel that POSTs a body your adapter transforms into this shape (or post directly from a small proxy). Pointing the channel at /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

Example investigation (CLI)