victoriametrics-metrics

Query and analyze time-series metrics in VictoriaMetrics using MetricsQL.

656|82|Updated Jan 20, 2026
One-click install
npx skills add https://github.com/incidentfox/incidentfox --skill victoriametrics-metrics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: victoriametrics-metrics
Source: https://github.com/incidentfox/incidentfox/tree/main/sre-agent/.claude/skills/metrics-victoriametrics
Command: npx skills add https://github.com/incidentfox/incidentfox --skill victoriametrics-metrics

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

Investigating production issues requires querying time-series metrics, but unbounded queries against VictoriaMetrics can flood context with thousands of series and slow down root cause analysis. This Skill enforces a context-efficient workflow—statistics first, then instant queries, then capped range queries—so you get compact, actionable metric data.

Core Features & Use Cases

  • Cardinality Discovery: The get_statistics.py script reports active series counts, top metric names, and top jobs before any heavy querying.
  • Targeted MetricsQL Queries: Run instant or range queries with PromQL and MetricsQL extensions (WITH templates, rollup functions, label manipulation) with output limits.
  • Label Discovery: List available labels and values scoped by series selectors to build precise filters.
  • Use Case: During an incident, check the error rate for a service by running statistics on the job, then querying the 5xx rate ratio, then drilling into the top 5 offending services with topk.

Quick Start

Ask the agent to check the current error rate for the api job in VictoriaMetrics, starting with metric statistics and then running a topk-limited MetricsQL query.

Frequently Asked Questions about victoriametrics-metrics

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

FAQPage Schema
How do I query metrics from VictoriaMetrics with MetricsQL?

Run the query_metrics.py script with a MetricsQL query string, defaulting to an instant query for compact single-value output. Use --type range with --time-range and --step only when you need trends, and always cap results with topk or --limit.

How do I check metric cardinality in VictoriaMetrics before querying?

Run get_statistics.py with a series selector to get the active series count, top 10 metric names, and top 5 jobs. This mandatory first step prevents unbounded queries against high-cardinality data.

Does MetricsQL support PromQL queries?

Yes, MetricsQL is fully PromQL-compatible and adds extensions like WITH templates, rollup functions, and label manipulation functions such as label_set and label_join. Standard PromQL queries like rate and histogram_quantile work unchanged.

How do I find available labels and values in VictoriaMetrics?

Use list_labels.py with no arguments to list all label names, or pass --label with an optional --match selector to get values scoped to specific series. Results are capped with --limit to keep output compact.

Why should I avoid unbounded range queries in VictoriaMetrics?

Unbounded range queries can return thousands of series and flood the context window with raw datapoints. The skill requires topk() or label filters, instant queries by default, and step values at least twice the scrape interval.