victorialogs-analysis

Analyze VictoriaLogs data with LogsQL using statistics-first server-side aggregation.

Updated Mar 26, 2026
One-click install
npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill victorialogs-analysis-erwinv2k-tkg
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: victorialogs-analysis
Source: https://github.com/erwinv2k-TKG/AgentesVSC/tree/main/packs/incidentfox/sre-agent/.claude/skills/observability-victorialogs
Command: npx skills add https://github.com/erwinv2k-TKG/AgentesVSC --skill victorialogs-analysis-erwinv2k-tkg

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires httpx, and includes scripts (resource) components.

What problem does it solve? Investigating incidents by dumping raw logs floods the context window and hides the real signal. This Skill enforces a statistics-first workflow for VictoriaLogs so you get error rates, top streams, and error patterns before ever looking at individual log lines. ## Core Features & Use Cases - Statistics-First Investigation: The get_statistics.py script returns total volume, error rate, logs per minute, top streams, and normalized error patterns as the mandatory first step. - Strategic Log Sampling: sample_logs.py supports errors_only, warnings_up, around_time, and all strategies, hard-capped at 50 entries to protect context. - Field Discovery and Raw LogsQL: list_fields.py reveals available fields and values, while query_logs.py executes arbitrary LogsQL with automatic safety limits. - Use Case: During a production incident, run get_statistics.py to see a 12% error rate concentrated in one stream, then sample errors_only logs around the spike timestamp to identify the failing pattern without reading thousands of lines. ## Quick Start Ask the agent to investigate recent errors in VictoriaLogs by starting with log statistics for the last hour.

Frequently Asked Questions about victorialogs-analysis

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I query VictoriaLogs with LogsQL for error analysis?

Start with get_statistics.py to get error counts and rates via server-side aggregation, then use sample_logs.py with the errors_only strategy to see representative errors. Use query_logs.py for custom LogsQL queries, which auto-appends a limit if none is present.

How to find which service produces the most errors in VictoriaLogs?

Run a LogsQL stats query such as 'error | stats by (service) count() hits | sort by (hits) desc' through query_logs.py. The get_statistics.py script also returns the top 10 streams by volume and top normalized error patterns automatically.

Does VictoriaLogs authentication require manual token configuration?

No manual token handling is needed in production. Credentials are injected transparently by a proxy layer, and the client also supports bearer token, basic auth, or direct URL modes via environment variables for testing.

What is the maximum number of logs returned when sampling?

sample_logs.py enforces a hard cap of 50 entries regardless of the requested limit, with a default of 20. This prevents context window flooding during incident investigation.

Why should I avoid running raw log queries without limits?

Unbounded queries can return thousands of log lines that flood the context and obscure patterns. The skill mandates statistics-first investigation and auto-appends '| limit N' to any query lacking a limit or stats pipe.