Overview
OpenSRE queries VictoriaLogs with LogsQL to retrieve structured log evidence — correlating application errors, request anomalies, and stream-level events with the alert under investigation.Prerequisites
- A reachable VictoriaLogs instance (for example
http://vmlogs:9428) - LogsQL knowledge for any custom queries you want OpenSRE to run
Setup
There is noopensre integrations setup victoria_logs handler. Configure VictoriaLogs with environment variables or the persistent store only.
Option 1: Environment variables
Add to your.env:
Leave
VICTORIA_LOGS_TENANT_ID unset for single-tenant clusters. OpenSRE does not send AccountID: 0 implicitly — that would target the default tenant on every request.
Option 2: Persistent store
Credentials
VictoriaLogs typically needs no API token for OpenSRE. PointVICTORIA_LOGS_URL at a reachable instance. On multi-tenant deployments, set
VICTORIA_LOGS_TENANT_ID so OpenSRE sends the correct AccountID header.
Investigation tools
When VictoriaLogs is configured, thevictoria_logs_query tool becomes available to the investigation agent. It runs LogsQL queries against /select/logsql/query and returns structured rows. The default is a wildcard match over the past hour; the agent narrows the query from alert context (service, level, trace ID, time window).
Verify
Troubleshooting
Security
LeaveVICTORIA_LOGS_TENANT_ID unset for single-tenant clusters. OpenSRE does not send AccountID: 0 implicitly — that would target the default tenant on every request.
Extras
How it works in investigations
Typical agent uses:- Pull recent error-level logs for the affected service to surface stack traces
- Filter by request ID or trace ID to follow a single failing transaction across services
- Compare log volume in the incident window against a known-good baseline to spot regressions