prometheus

Analyze time-series metrics and create PromQL alerting and recording rules.

213|18|Updated Mar 17, 2026
One-click install
npx skills add https://github.com/grafana/skills --skill prometheus-grafana-2
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prometheus
Source: https://github.com/grafana/skills/tree/main/skills/grafana-lgtm/prometheus
Command: npx skills add https://github.com/grafana/skills --skill prometheus-grafana-2

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Provides clear guidance for querying, visualizing, and alerting on time-series metrics so engineers can quickly identify performance regressions and reliability issues without guessing PromQL syntax or architecture patterns.

Core Features & Use Cases

  • PromQL reference and patterns: Examples of instant vector selectors, range vectors, rate functions, aggregations, and common query patterns for error rates, saturation, and prediction.
  • Alerting and recording rules: Guidance for creating recording rules to precompute expensive queries and authoring alert expressions for Alertmanager and Grafana unified alerting.
  • Architecture and integrations: Explanations of pull-based scraping, service discovery, push gateway use cases, and remote write/read integration with Grafana Cloud Metrics and Mimir.
  • Use Case: Craft a dashboard panel that shows grouped per-service 5m error rate, add a recording rule for the metric, and propose an alerting policy with notification routing.

Quick Start

Use the prometheus skill to craft a PromQL query that calculates the 5 minute error rate for service api-server, propose a recording rule, and suggest an alert expression and notification policy.

Frequently Asked Questions about prometheus

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

FAQPage Schema
How do I write a PromQL query to calculate the 5 minute error rate for a service?

To calculate the 5 minute error rate in PromQL, use rate functions and instant vector selectors over a 5 minute range vector. You can aggregate grouped per-service error rates by applying sum and by() clauses to your metric selectors.

What is the best way to precompute expensive PromQL queries for dashboards?

The best way to precompute expensive PromQL queries is by authoring recording rules. Recording rules evaluate heavy PromQL expressions on a schedule and store the results as new time-series metrics, reducing dashboard loading times and query load.

How do I set up alerting rules and notification routing for Prometheus metrics?

You set up alerting by authoring alert expressions using PromQL and configuring notification routing. Alert expressions trigger based on metric thresholds, and notifications are routed through Alertmanager or Grafana unified alerting to deliver alerts to the right channels.

Does Prometheus remote write work with Grafana Cloud Metrics for scalable storage?

Yes, Prometheus remote write integrates with Grafana Cloud Metrics and Mimir for scalable metric storage. This architecture pattern allows you to push locally scraped metrics to a centralized remote endpoint for long-term retention and querying.

When do I need to use recording rules instead of direct dashboard queries?

You need recording rules when direct dashboard queries are computationally expensive or cause performance regressions. Precomputing complex aggregations and rate functions into persistent metrics prevents query timeouts during high cardinality or high traffic analysis.