monitoring-authoring

Author PrometheusRule, ServiceMonitor, PodMonitor, AlertmanagerConfig, Silence, and Canary resources for Kubernetes monitoring.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

Monitoring engineers and platform teams need a consistent, correct way to author PrometheusRule alerts/recording rules and to wire up metric scraping plus Alertmanager routing and silences, without breaking discovery labels or common platform conventions.

Core Features & Use Cases

  • Author PrometheusRule alerts & recording rules: Create PrometheusRule manifests using the required kube-prometheus-stack discovery label and standardized alert annotations, including severity and for-duration guidance.
  • Define scrape targets with ServiceMonitor and PodMonitor: Set up Kubernetes metric scraping for services and pods, including correct namespace placement, selectors, and required labels.
  • Configure Alertmanager and silencing behavior: Add AlertmanagerConfig routing and create Silence CRs for declarative suppression of known alerts.
  • Build canary health checks: Write Canary resources for synthetic HTTP checks and Kubernetes CEL-based health verification, avoiding canary patterns that produce false negatives.

Quick Start

Use the monitoring-authoring skill to create a PrometheusRule, ServiceMonitor, and a Canary for your new application so alerts and scrapes are discovered by Prometheus and routing/silencing rules are aligned with the platform conventions.

Frequently Asked Questions about monitoring-authoring

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

FAQPage Schema
How do I create PrometheusRule alerts and recording rules for Kubernetes workloads?

To create PrometheusRule alerts, you author manifests that apply the required kube-prometheus-stack discovery label and standardized alert annotations, including severity and for-duration guidance. This ensures Prometheus correctly discovers and executes your alerting and recording rules for Kubernetes workloads.

How do I configure ServiceMonitor and PodMonitor for Kubernetes metric scraping?

Configuring ServiceMonitor and PodMonitor for metric scraping requires setting correct namespace placement, selectors, and required discovery labels. This ensures Prometheus can properly discover and scrape metrics from your targeted Kubernetes services and pods.

What is the best way to route AlertmanagerConfig and create Silence CRs for known alerts?

The best way to route AlertmanagerConfig and create Silence CRs is to declaratively add routing configurations and suppression custom resources. This approach aligns suppression behavior with platform conventions for known alerts without breaking discovery labels.

How do I write Canary health checks for synthetic HTTP and CEL-based verification?

Writing Canary health checks involves creating Canary resources for synthetic HTTP checks and Kubernetes CEL-based health verification. You must avoid canary patterns that produce false negatives to ensure accurate synthetic monitoring of application and platform components.

Why are my PrometheusRules or ServiceMonitors not being discovered by Prometheus?

PrometheusRules or ServiceMonitors may not be discovered if they lack required kube-prometheus-stack discovery labels or use incorrect Kubernetes placement and selectors. Authoring monitoring resources must enforce these required labels and correct selectors for proper discovery.