Reglas threshold

Threshold es el tipo de regla más común. Se dispara cuando el valor de una métrica cruza el umbral indicado.

Campos

  • metric — un bare metric name o PromQL completo
  • filters — mandatory matchers (organization_id siempre se inyecta automáticamente)
  • comparator> < >= <= == !=
  • threshold — un valor numérico
  • for_duration_seconds — protección contra flapping (0 = inmediato)
  • severity — critical/warning/info

Ejemplo

metric: system_cpu_usage_percent
filters: {role: "web"}
comparator: >
threshold: 80
for: 60s
severity: warning

Se dispara cuando CPU > 80% en hosts con el label role=web de forma continua durante 60 segundos.