Prometheus 告警规则生成器

100% 浏览器本地・零服务器上传

可视化构建 Prometheus 告警规则与 PromQL 阈值条件(支持 Node/K8s/Web)

Battle-Tested Alert Rule Templates

Prometheus Rule Group

Alert Rules (4)

1
2
3
4
Generated Alert Rules YAML
# Prometheus Alert Rules
# Generated by MiniToolDesk (https://minitooldesk.com/tools/prometheus-alert-generator/)
groups:
  - name: node-exporter-alerts
    interval: 30s
    rules:
      - alert: HostInstanceDown
        expr: up == 0
        for: 2m
        labels:
          severity: critical
        annotations:
          summary: "Instance {{ $labels.instance }} is down"
          description: "Target exporter {{ $labels.instance }} has been unreachable for more than 2 minutes."
          runbook_url: "https://runbooks.prometheus-operator.dev/runbooks/general/targetdown"
      - alert: HostHighCpuLoad
        expr: 100 - (avg by(instance) (rate(node_cpu_seconds_total{mode="idle"}[5m])) * 100) > 85
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "High CPU utilization on {{ $labels.instance }}"
          description: "CPU load is over 85% for > 5m (current value: {{ $value }}%)."
      - alert: HostHighMemoryUsage
        expr: (node_memory_MemTotal_bytes - node_memory_MemAvailable_bytes) / node_memory_MemTotal_bytes * 100 > 90
        for: 5m
        labels:
          severity: warning
        annotations:
          summary: "High memory usage on {{ $labels.instance }}"
          description: "Host memory usage exceeds 90% (current: {{ $value }}%)."
      - alert: HostDiskSpaceFillingFast
        expr: node_filesystem_free_bytes{mountpoint="/"}/node_filesystem_size_bytes{mountpoint="/"} * 100 < 10
        for: 10m
        labels:
          severity: critical
        annotations:
          summary: "Disk root volume low on {{ $labels.instance }}"
          description: "Root filesystem has less than 10% free space remaining."

Prometheus & Alertmanager Compatible

Directly loadable by Prometheus, VictoriaMetrics, Grafana Mimir, or Prometheus Operator PrometheusRule CRDs.

将此工具固定在浏览器侧边栏

随时按下 Alt+M 即可在当前标签页侧边唤出此工具,免去切网页的麻烦。100% 离线免费。

获取浏览器插件

如何快速构建 Prometheus 告警规则

  1. 1选择预设模板(Node Exporter 监控、Web HTTP 状态、Kubernetes Pod)或创建自定义组。
  2. 2设置告警名称、严重度(Critical / Warning / Info)及触发持续时间。
  3. 3调整或自定义 PromQL 表达式与告警阈值参数。
  4. 4输入包含 {{ $labels }} 和 {{ $value }} 的描述,直接复制或下载 YAML 规则文件。

企业级云原生可观测性

生成的规则语法符合标准 Prometheus 规范,可无缝应用于 Prometheus、VictoriaMetrics、Grafana Mimir 或 K8s PrometheusRule CRD。

常见问题解答 (FAQ)

喜欢 Prometheus 告警规则生成器 吗?分享给你的工程师朋友,一起告别广告与隐私泄露!

MiniToolDesk 100% 离线计算、零数据上传,您的支持是保持纯净无广告的动力。

相关开发者工具