--- import BaseLayout from '../layouts/BaseLayout.astro'; import StatsBar from '../components/StatsBar.astro'; import ServiceCard from '../components/ServiceCard.astro'; import SearchWidget from '../components/SearchWidget.astro'; import { data, getGroupSlug, getRuleCount, getTotalRuleCount, getTotalServiceCount, getPopularServices } from '../data/rules'; import { SITE_URL, GITHUB_URL, schemaAuthor, schemaPublisher, schemaWebSite, SITE_DATE_PUBLISHED, LICENSE_CC_BY_URL, LICENSE_MIT_URL } from '../data/site'; const base = import.meta.env.BASE_URL.replace(/\/$/, ''); const totalRules = getTotalRuleCount(); const totalServices = getTotalServiceCount(); const popularServices = getPopularServices(); const org = { '@type': 'Organization', '@id': `${SITE_URL}#organization`, name: schemaPublisher.name, url: GITHUB_URL, logo: { '@type': 'ImageObject', url: `${SITE_URL}favicon.svg`, }, sameAs: [GITHUB_URL, SITE_URL], contactPoint: { '@type': 'ContactPoint', contactType: 'technical support', url: `${GITHUB_URL}/issues`, }, }; const buildDate = new Date().toISOString().slice(0, 10); const faqItems = [ { '@type': 'Question', name: 'What are Prometheus alerting rules?', acceptedAnswer: { '@type': 'Answer', text: 'Prometheus alerting rules are PromQL-based conditions evaluated by the Prometheus server. When a condition is true for a specified duration, an alert fires and is routed by AlertManager to receivers like Slack, PagerDuty, or email. Rules are defined as YAML files and cover metrics thresholds, absence of expected data, and rate-of-change conditions.', }, }, { '@type': 'Question', name: 'How do I use these Prometheus alert rules?', acceptedAnswer: { '@type': 'Answer', text: 'Find the service you want to monitor, copy the YAML snippet for any rule, and paste it into your Prometheus rules file (e.g., alerts/my-service.yml). Reload Prometheus to apply the rules. Adjust thresholds to match your workload — the values provided are sensible defaults but may need tuning.', }, }, { '@type': 'Question', name: 'What exporters and services are covered?', acceptedAnswer: { '@type': 'Answer', text: `Awesome Prometheus Alerts covers ${totalServices} services across ${data.groups.length} categories: ${data.groups.map((g) => `${g.name} (${g.services.map((s) => s.name).join(', ')})`).join('; ')}.`, }, }, { '@type': 'Question', name: 'What is the difference between warning and critical severity?', acceptedAnswer: { '@type': 'Answer', text: 'Critical alerts require immediate human attention — the system is down or severely degraded and revenue or reliability is directly impacted. Warning alerts need attention soon but are not immediately urgent. Info alerts are awareness-only, such as configuration changes or underutilized resources. Set up AlertManager routes to page on-call engineers only for critical alerts.', }, }, { '@type': 'Question', name: 'What is PromQL?', acceptedAnswer: { '@type': 'Answer', text: 'PromQL (Prometheus Query Language) is the functional query language used to select, filter, and aggregate time-series data in Prometheus. Alert rules use PromQL expressions — for example, rate(http_requests_total[5m]) > 100 fires when request rate exceeds 100/s over a 5-minute window.', }, }, { '@type': 'Question', name: 'Can I contribute new alert rules?', acceptedAnswer: { '@type': 'Answer', text: `Yes! Contributions are welcome. Open a pull request on GitHub at ${GITHUB_URL} with your new rules added to the _data/rules.yml file. Follow the existing format: provide a clear rule name, a description explaining what the alert means and why it matters, a tested PromQL expression, an appropriate severity, and a sensible "for" duration to avoid false positives.`, }, }, { '@type': 'Question', name: 'What is AlertManager and how does it relate to these rules?', acceptedAnswer: { '@type': 'Answer', text: 'AlertManager is the component that receives firing alerts from Prometheus and handles deduplication, grouping, silencing, and routing to receivers (Slack, PagerDuty, email, webhooks). The alert rules in this collection fire alerts from Prometheus — AlertManager then decides who to notify and when. See the AlertManager Configuration guide on this site for setup examples.', }, }, { '@type': 'Question', name: 'How do I silence or suppress an alert?', acceptedAnswer: { '@type': 'Answer', text: 'AlertManager supports silences — time-bounded mutes applied via its UI or API that suppress notifications without disabling the rule. For recurring suppression (nights, weekends, deployments), use inhibition rules or time-based PromQL patterns. See the Sleep Peacefully guide on this site for timezone-aware suppression examples using day_of_week() and hour() functions.', }, }, { '@type': 'Question', name: 'What is the license for these alert rules?', acceptedAnswer: { '@type': 'Answer', text: `The alert rules and content are licensed under Creative Commons CC BY 4.0 — you are free to use, adapt, and redistribute them, including commercially, as long as you provide attribution. The site source code is licensed under MIT. See the LICENSE file in the GitHub repository for details.`, }, }, ]; const jsonLd = { '@context': 'https://schema.org', '@graph': [ org, { '@type': 'SoftwareSourceCode', name: 'awesome-prometheus-alerts', description: 'Collection of Prometheus alerting rules — YAML configurations for 90+ services', url: GITHUB_URL, codeRepository: GITHUB_URL, programmingLanguage: 'YAML', author: schemaAuthor, license: LICENSE_MIT_URL, }, { '@type': 'Dataset', name: 'Awesome Prometheus Alerts', description: `Collection of ${totalRules} production-ready Prometheus alerting rules covering ${totalServices} services and 13 categories including databases, Kubernetes, cloud providers, and more.`, url: SITE_URL, creator: schemaAuthor, datePublished: SITE_DATE_PUBLISHED, dateModified: buildDate, keywords: ['Prometheus', 'alerting rules', 'monitoring', 'PromQL', 'SRE', 'DevOps', 'observability'], license: LICENSE_CC_BY_URL, isAccessibleForFree: true, }, { '@type': 'FAQPage', '@id': `${SITE_URL}#faq`, mainEntity: faqItems, }, { '@type': 'WebSite', '@id': `${SITE_URL}#website`, name: schemaWebSite.name, url: SITE_URL, description: `Collection of ${totalRules} copy-pasteable Prometheus alerting rules for ${totalServices} services.`, publisher: { '@id': `${SITE_URL}#organization` }, potentialAction: { '@type': 'SearchAction', target: { '@type': 'EntryPoint', urlTemplate: `${SITE_URL}rules/?q={search_term_string}`, }, 'query-input': 'required name=search_term_string', }, }, { '@type': 'SoftwareApplication', name: schemaWebSite.name, applicationCategory: 'DeveloperApplication', operatingSystem: 'All', url: SITE_URL, image: `${SITE_URL}favicon.svg`, description: `Collection of ${totalRules} copy-pasteable Prometheus alerting rules for ${totalServices} services — covering databases, Kubernetes, cloud providers, message brokers, and more.`, author: schemaAuthor, publisher: { '@id': `${SITE_URL}#organization` }, offers: { '@type': 'Offer', price: 0, priceCurrency: 'USD', }, }, { '@type': 'ItemList', name: 'Site Navigation', itemListElement: [ { '@type': 'SiteNavigationElement', position: 1, name: 'Alert Rules', url: `${SITE_URL}rules/` }, { '@type': 'SiteNavigationElement', position: 2, name: 'AlertManager Config', url: `${SITE_URL}alertmanager/` }, { '@type': 'SiteNavigationElement', position: 3, name: 'Blackbox Exporter', url: `${SITE_URL}blackbox-exporter/` }, { '@type': 'SiteNavigationElement', position: 4, name: 'Sleep Peacefully', url: `${SITE_URL}sleep-peacefully/` }, ], }, ], }; ---
Prometheus

Awesome Prometheus Alert Rules

{totalRules} copy-pasteable Prometheus alerting rules. Find, copy, and deploy alerts in seconds.

Popular services

{popularServices.map(({ service, groupSlug, serviceSlug }) => ( {service.name} ))}

Browse by category

{data.groups.map((group) => { const groupSlug = getGroupSlug(group); const groupRuleCount = group.services.reduce((sum, svc) => sum + getRuleCount(svc), 0); return (

{group.name}

{group.services.length} services · {groupRuleCount} rules
{group.services.map((service) => ( ))}
); })}

Frequently asked questions

{faqItems.map((item) => (
{item.name}

{item.acceptedAnswer.text}

))}