metrics-stack

Configure Prometheus and Grafana for monitoring with PromQL and dashboards.

2|Updated Mar 15, 2025
One-click install
npx skills add https://github.com/dandudzi/dotfiles --skill metrics-stack
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: metrics-stack
Source: https://github.com/dandudzi/dotfiles/tree/main/dot_claude/skills/metrics-stack
Command: npx skills add https://github.com/dandudzi/dotfiles --skill metrics-stack

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides comprehensive guidance and configuration examples for setting up, managing, and optimizing the Prometheus and Grafana monitoring stack, enabling robust observability for applications and infrastructure.

Core Features & Use Cases

  • Prometheus Configuration: Detailed examples for prometheus.yml, service discovery (Kubernetes, file-based, EC2), and relabeling.
  • PromQL Mastery: Essential queries for counters, gauges, histograms, aggregation, and complex scenarios.
  • Grafana Dashboards: Best practices for dashboard design (RED, USE methods), panel types, templating, and SLO implementation.
  • Alerting & Long-Term Storage: Configuration for Alertmanager, PrometheusRule CRDs, Thanos, and Cortex.
  • Use Case: You need to set up a new microservice's monitoring. Use this Skill to configure Prometheus scraping, define essential PromQL queries for its performance metrics, design a Grafana dashboard using the RED method, and set up alerts for critical conditions like high error rates or latency.

Quick Start

Use the metrics-stack skill to configure Prometheus scrape jobs for Kubernetes pods.

Frequently Asked Questions about metrics-stack

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

FAQPage Schema
How do I configure Prometheus service discovery for Kubernetes pods?

Configure Prometheus service discovery for Kubernetes pods by defining scrape jobs in prometheus.yml and applying relabeling rules to filter targets. This Skill provides detailed configuration examples for Kubernetes, file-based, and EC2 service discovery setups.

What is the best way to write PromQL queries for histograms and counters?

The best way to write PromQL queries for histograms and counters involves using specific aggregation functions to calculate rates and percentiles. This Skill offers guidance on essential PromQL queries for complex scenarios, gauges, and aggregations.

How do I design Grafana dashboards using the RED and USE methods?

Design Grafana dashboards using the RED and USE methods by selecting appropriate panel types and applying templating to visualize resource metrics. This Skill covers best practices for dashboard design and SLO implementation.

When do I need long-term storage solutions like Thanos or Cortex for Prometheus?

You need long-term storage solutions like Thanos or Cortex for Prometheus when retaining metrics beyond local disk capacity or building highly available clusters. This Skill addresses configuring these solutions for robust monitoring at scale.

How do I set up Alertmanager and PrometheusRule CRDs for alerting?

Set up Alertmanager and PrometheusRule CRDs for alerting by defining routing rules and threshold conditions within your cluster. This Skill provides configuration examples for Alertmanager and PrometheusRule CRDs to handle critical conditions.

How do I manage high cardinality and avoid anti-patterns in Prometheus?

Manage high cardinality and avoid anti-patterns in Prometheus by limiting label values and optimizing query structures to prevent memory overload. This Skill addresses cardinality management and common anti-patterns for robust monitoring.