prometheus

Query Prometheus metrics, alerts, and rules via kubectl exec or port-forward.

1|Updated Apr 6, 2025
One-click install
npx skills add https://github.com/david-driscoll/stargate-command-cluster --skill prometheus-david-driscoll
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: prometheus
Source: https://github.com/david-driscoll/stargate-command-cluster/tree/main/.agents/skills/prometheus
Command: npx skills add https://github.com/david-driscoll/stargate-command-cluster --skill prometheus-david-driscoll

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires curl, jq, python3, and includes scripts (resource) and references (resource) components.

What problem does it solve?

Prometheus users need a reliable way to check real-time metrics, investigate performance issues, and confirm whether alerts are firing without getting blocked by gateway access constraints.

Core Features & Use Cases

  • Access Prometheus securely behind OAuth2: Use pod-local querying via kubectl exec or repeatable access via port-forward when the public/internal DNS URL cannot be used for curl API calls.
  • Run common PromQL instantly: Ask focused questions (CPU %, memory %, problematic pods, container restarts) using the provided promql.sh helper or inline PromQL.
  • Inspect alerting and rules: List firing alerts and enumerate alert/rule definitions to speed up incident triage and validation.

Quick Start

Start a port-forward to Prometheus and run a query by using the scripts/promql.sh helper.

Frequently Asked Questions about prometheus

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

FAQPage Schema
How do I query Prometheus metrics when the internal DNS endpoint is blocked by OAuth2 Proxy?

To query Prometheus metrics behind an OAuth2 Proxy, use kubectl exec for pod-local querying or establish a port-forward. This bypasses gateway constraints that block direct curl API calls to the protected internal DNS endpoint.

How do I check firing alerts and enumerate alerting rules in a Kubernetes cluster?

You can inspect alerting rules and check firing alerts in a Kubernetes cluster by querying the Prometheus instance. This allows you to list active alerts and enumerate rule definitions to speed up incident triage and validation.

What is the best way to run PromQL queries for cluster monitoring troubleshooting?

The best way to run PromQL queries for cluster monitoring is by using a provided promql.sh helper script. This allows you to instantly ask focused questions about CPU usage, memory, problematic pods, and container restarts.

Can I use curl to directly access Prometheus API endpoints protected by OAuth2?

No, you cannot use curl to directly access Prometheus API endpoints protected by OAuth2. The proxy blocks these direct calls, requiring you to access metrics securely through kubectl exec or a repeatable port-forward instead.

Do I need curl and jq to run instant PromQL queries for cluster observability?

Yes, you need curl, jq, and python3 installed to run instant PromQL queries for cluster observability. These dependencies support the scripts that retrieve metrics, alert states, and health checks across the monitoring namespace.