Prometheus Alert Rule Builder
Build Prometheus alerting rules — groups, alerts, expressions, durations, labels, and annotations.
Group
Rule 1
Examples
High latency alert
alert HighRequestLatency
expr rate(http_request_duration_seconds_sum[5m]) > 0.5
for 10m, severity warninggroups:
- name: service-alerts
rules:
- alert: HighRequestLatency
expr: rate(http_request_duration_seconds_sum[5m]) > 0.5
for: 10m
labels:
severity: warningAn alert fires when the 5-minute average latency stays above 0.5s for 10 minutes.
About this tool
The Prometheus Alert Rule Builder writes an alerting rules YAML. Set a group name and add rules — each with an alert name, a PromQL expression, a for duration, a severity label, and summary/description annotations. The output is a rules file you load into Prometheus — nothing is uploaded.
How to use this tool
Name the group
Group related alerts under one name for organisation.
Add rules
Each rule needs an expression; for, severity, and annotations make it useful.
Load into Prometheus
Reference the file from rule_files and reload Prometheus.
Use cases
Service SLOs
Turn latency or error-rate SLOs into concrete alerting rules.
Common mistakes
Mistake:Forgetting the for duration.
Fix:Without a for, a single scrape spike pages you immediately; add a duration to smooth noise.
Frequently asked questions
Where does the alert expression come from?
You write the PromQL expression for each alert. The builder only formats it into the rules YAML — it does not validate the query.
What is the `for` field?
It is how long the alert must stay firing before it becomes active, for example `5m` means the condition must hold for five minutes.
How do I load the rules into Prometheus?
Copy the YAML into a rules file referenced by Prometheus' rule_files config and reload Prometheus.
Related guides
Prometheus Alerting Rules, Demystified
How groups, alerts, expressions, for-durations, labels, and annotations compose in a Prometheus rules file. Write alerts you can page on without drowning in.
Anatomy of an Ansible Playbook
How plays, hosts, vars, and task modules compose in an Ansible playbook YAML. Read the structure before you run it against real hosts.
References & standards
Related tools
.env Secret Safety Linter
Validate .env syntax and spot likely leaked credentials or placeholder secrets.
.htaccess Generator
Build an Apache .htaccess — HTTPS redirects, rewrites, error pages, security headers, and basic auth
2D Fluid Dynamics & Particle Physics Sandbox
A physics playground with two engines sharing one canvas. The fluid mode runs a real Eulerian Navier-Stokes solver — semi-Lagrangian advection, explicit diffusion, Jacobi pressure projection and vorticity confinement — that you paint with dye and velocity using mouse or touch. The particle mode is a damped Verlet N-body engine with gravity wells, Coulomb attractors and repulsors, spring links, wall restitution and elastic circle collisions. Particle counts adapt to the device (100k target on WebGL2 desktop, 2k-5k on CPU fallback), and every configuration exports as runnable code: a Matter.js world, a PixiJS ticker setup, or a standalone vanilla Canvas engine.
AI Function Calling Schema Generator
Generate function calling JSON schemas from TypeScript interfaces
Algorithm Arena & Data Structure Visualizer
Interactive arena for algorithms and data structures: eight sorting algorithms racing on one seeded input, six pathfinding algorithms walking generated mazes, and BST, AVL, Red-Black, B-tree, heap and trie operations replayed step by step with rotations highlighted. Every run shows the Big-O table and the phase-highlighted reference implementation in four languages, and compared values can be played as pitch (sonification) through the shared audio engine. Everything runs client-side; inputs never leave the browser.
Ansible Playbook Generator
Build an Ansible playbook — hosts, vars, and tasks with modules — as YAML