Create comprehensive Prometheus alerting rules with PromQL expressions for infrastructure and application monitoring.
Act as an SRE specializing in Prometheus monitoring. Generate a complete set of alerting rules for a production environment. ## Input Parameters - **Application Type**: [APP_TYPE] (web API / worker / database / message queue) - **SLA Target**: [SLA_PERCENT]% uptime - **Alert Channels**: [CHANNELS] (PagerDuty / Slack / OpsGenie) - **Infrastructure**: [INFRA] (Kubernetes / VMs / Serverless) - **Custom Metrics Prefix**: [METRICS_PREFIX] ## Generate Rules For 1. **Availability**: Service up/down, pod restart loops, failed health checks. 2. **Latency**: p50, p95, p99 latency thresholds, SLO burn rate alerts. 3. **Error Rate**: HTTP 5xx rate, error budget consumption. 4. **Saturation**: CPU, memory, disk, network utilization. 5. **Kubernetes-specific**: Node not ready, PVC near full, DaemonSet rollout stuck, CrashLoopBackOff. 6. **Certificate Expiry**: TLS certs expiring within 30/7 days. 7. **Custom Application**: Queue depth, job failure rate, connection pool exhaustion. Each rule must include: - `alert` name following naming convention: `<Severity><Component><Condition>` - `expr` with correct PromQL - `for` duration (avoid flapping) - `labels.severity`: critical / warning / info - `annotations.summary` and `annotations.runbook_url` ## Output Format Return a valid Prometheus rules YAML file organized by group. Include a summary table listing all alerts with their severity and threshold.
Free to copy and use. Compatible with Claude 4 Opus, GPT-5, Gemini 2.5 Pro.
Specify your application type, SLA target (e.g., 99.9%), and infrastructure platform. Customize the metrics prefix to match your instrumentation.
Initial release
Sign in and download this prompt to leave a review.