query-metrics

Translate operational questions into metrics queries with aggregation and baseline comparisons.

Updated Dec 21, 2018
One-click install
npx skills add https://github.com/dhnt/dhnt --skill query-metrics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: query-metrics
Source: https://github.com/dhnt/dhnt/tree/main/catalog/md/operate/query-metrics
Command: npx skills add https://github.com/dhnt/dhnt --skill query-metrics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

query-metrics turns ambiguous operational questions into evidence-based answers by using aggregated service metrics instead of single-request logs.

Core Features & Use Cases

  • Metric selection for the question shape: choose between rates, gauges, histograms, and summaries so the query matches the intent (for example, p95 latency vs error frequency).
  • Correct time windows and comparisons: set appropriate windows for drift vs incidents and compare against a baseline using offsets.
  • Dimension-aware aggregation: aggregate across the right labels to avoid hiding the real failure mode behind an averaged result.

Quick Start

Ask the AI to generate a metrics query for the question “Is p95 latency for /search higher this week than last week?” and include the aggregation dimensions and baseline comparison.

Frequently Asked Questions about query-metrics

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

FAQPage Schema
How do I query Prometheus metrics to check if p95 latency increased this week?

To check p95 latency, query Prometheus metrics by selecting a histogram or summary metric type, setting the appropriate time window, and comparing current values against a baseline using an offset to identify drift or regression.

What is the correct way to aggregate observability metrics during incident triage?

Correct observability metric aggregation during incident triage requires grouping data across specific dimensions or labels, avoiding broad averages that can hide the actual failure mode behind a misleadingly normal result.

When should I use gauges versus histograms for system behavior monitoring?

Use gauges for monitoring current system state values that go up or down, and use histograms or summaries for analyzing distributions like latency percentiles, ensuring the metric type matches your operational question.

Do I need to use PromQL to translate operational questions into metric queries?

You can use PromQL to translate operational questions into metric queries for Prometheus-family backends, or apply the same query translation logic to vendor metric platforms to get evidence-based quantitative answers.

Why does my averaged metrics query hide the real failure mode?

Averaged metrics queries hide the real failure mode because broad aggregation across all dimensions flattens localized spikes, masking the specific labels or segments where the actual system behavior degradation is occurring.