Install with Codex or Claude Copy this prompt, paste it into Codex, Claude, or another assistant, and let it review the skill page and install it for you.
A direct command skips the review prompt. Inspect the source before running it.
Author monitoring resources: PrometheusRules, ServiceMonitors, PodMonitors,
AlertmanagerConfig, Silence CRs, and canary-checker health checks.
Use when: (1) Creating or modifying alert rules (PrometheusRule), (2) Adding scrape targets
(ServiceMonitor/PodMonitor), (3) Configuring Alertmanager routing or silences,
(4) Writing canary-checker health checks, (5) Creating recording rules,
(6) Adding monitoring for a new application or platform component.
Triggers: "create alert", "add alerting", "PrometheusRule", "ServiceMonitor", "PodMonitor",
"AlertmanagerConfig", "silence alert", "canary check", "recording rule", "add monitoring",
"scrape target", "alert rule", "prometheus rule", "health check canary"
user-invocable
false
Monitoring Resource Authoring
This skill covers creating and modifying monitoring resources. For querying Prometheus
or investigating alerts, see the prometheus skill and
sre skill.
Resource Types
Resource
API Group
Purpose
PrometheusRule
monitoring.coreos.com/v1
Alert rules and recording rules
ServiceMonitor
monitoring.coreos.com/v1
Scrape metrics from Services
PodMonitor
monitoring.coreos.com/v1
Scrape metrics from Pods directly
ScrapeConfig
monitoring.coreos.com/v1alpha1
Advanced scrape configuration
AlertmanagerConfig
monitoring.coreos.com/v1alpha1
Routing, receivers, silencing
Silence
observability.giantswarm.io/v1alpha2
Declarative Alertmanager silences
Canary
canaries.flanksource.com/v1
Synthetic health checks (HTTP, TCP, K8s)
See [references/file-placement.md] for where to put each resource type and naming conventions.
PrometheusRule Authoring
Every PrometheusRule must include release: kube-prometheus-stack label for Prometheus to discover it.
Guidelines: for: 0m only for instant failures (e.g., SMART fail). Most alerts: 5m default. Flap-prone metrics (error rates, latency): 10m-15m. Use 5m for absence detection.
Alert Grouping
Group related alerts in named rule groups — affects Prometheus UI ordering:
See [references/alert-patterns.md] for common alert patterns (down, error rate, latency, capacity, PVC), annotation template functions, and recording rule examples.
Use when pods expose metrics but don't have a Service (DaemonSets, sidecars). Same pattern as ServiceMonitor with podMetricsEndpoints instead of endpoints, and numeric ports quoted: port: "15020". For matchExpressions selecting multiple values, see any existing Flux PodMonitor in config/monitoring/.
See [references/alertmanagerconfig-reference.md] for AlertmanagerConfig routing, Silence CR templates, and matcher reference.
Canary Health Checks
Canary resources live in config/canary-checker/ (platform) or alongside app config.
Check if the chart provides monitoring via Helm values first (kubesearch <chart-name> serviceMonitor) → enable via values if available → else create ServiceMonitor/PodMonitor + PrometheusRule + Canary manually → place in correct directory → register in kustomization → task k8s:validate → verify after deployment: