gke-alert-configuration

Generates Terraform alerting policies for GKE workloads using PromQL and Managed Service for Prometheus.

Updated May 11, 2026
One-click install
npx skills add https://github.com/alon3153/upe-social-publisher --skill gke-alert-configuration-alon3153
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: gke-alert-configuration
Source: https://github.com/alon3153/upe-social-publisher/tree/main/.agents/skills/gke-alert-configuration
Command: npx skills add https://github.com/alon3153/upe-social-publisher --skill gke-alert-configuration-alon3153

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve? Writing correct, low-noise alerting policies for Google Kubernetes Engine is hard: PromQL queries have subtle failure modes (empty vectors on traffic loss, redundant duration windows inflating MTTD), and kube-state-metrics ingestion can silently drive up Google Cloud Managed Service for Prometheus bills. This Skill produces validated Terraform alert policies that follow SRE best practices while enforcing cost guardrails. ## Core Features & Use Cases - Golden Signals Coverage: Generates alerts for latency (P95), errors (Multi-Window Multi-Burn-Rate SLO), traffic (absent()/default 0 outage detection), and memory saturation, plus cluster health signals like CrashLoopBackOff and Node NotReady. - KSM Cost Guardrails: Classifies every metric as Tier 1 (native/cAdvisor, zero surcharge) or Tier 2 (kube-state-metrics), requires explicit user consent before KSM-dependent alerts, and provides filtered PodMonitoring allowlists. - Plan-Validate-Execute Workflow: Drafts a changes.json plan, validates PromQL syntax, lookback windows, durations, and duplicate signals via scripts/validate_config.py, then merges approved policies into alerts.tf. - Use Case: Ask for an alerting suite for a GKE service and receive a complete alerts.tf and variables.tf with MWMBR SLO burn-rate alerts, dynamic grouping by cluster/namespace/service, and plain-English explanations of each threshold. ## Quick Start Generate Terraform alerting policies covering the four Golden Signals for my GKE service in the production namespace of cluster main-cluster.

Frequently Asked Questions about gke-alert-configuration

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

FAQPage Schema
How do I create GKE alerting policies in Terraform with PromQL?▼

Define google_monitoring_alert_policy resources with condition_prometheus_query_language blocks containing PromQL queries. Declare variables for project_id, cluster_name, and namespace, and use grouping aggregations like by (cluster, namespace, service) so one policy dynamically covers all workloads.

What is a Multi-Window Multi-Burn-Rate SLO alert?▼

It evaluates error budget consumption across two simultaneous lookback windows, such as 14.4x burn rate over 1 hour and 5 minutes for a 99% SLO. Both windows must exceed the threshold, eliminating false alarms from short bursts that simple error-rate ratios produce.

Does kube-state-metrics increase Google Cloud monitoring costs?▼

Yes. Managed Service for Prometheus bills per ingested sample, and unmodified kube-state-metrics scrapes state for every cluster object. Use a filtered PodMonitoring resource with metricRelabeling keep rules to ingest only the specific kube_* metrics your alerts require.

Why does my traffic-drop alert not fire when requests stop?▼

When traffic drops to zero, Prometheus stops emitting the time series, so rate(...) == 0 evaluates to an empty vector and never fires. Use sum(rate(...[5m])) default 0 == 0 or absent(...) == 1 to reliably detect total traffic loss.

Can this skill configure alerts for Cloud Run or Compute Engine?▼

No. It is strictly scoped to GKE workloads using Managed Service for Prometheus and PromQL. For standalone Compute Engine or Cloud Run, use standard google_monitoring_alert_policy with condition_threshold or MQL against metrics like compute.googleapis.com/instance/cpu/utilization.

Why should memory saturation alerts not use long duration windows?▼

Queries with aggregated lookback windows like increase(...[15m]) already smooth transient spikes, so adding duration = "300s" only inflates mean time to detect by up to 20 minutes. Set duration to "0s" or "60s" for lookback-based queries and reserve 300s for instantaneous gauges.