Skip to main content

rules

Typed specification

Generated by the pinned ess generate --kind docs from adapters/prometheus/spec/ess. Structural validation establishes consistency; behaviour, storage and cross-record predicates remain implementation obligations.

Prometheus-owned alerting and recording rules as rules.list returns them, one record per rule.

connectors_prometheus.rules is one of connectors_prometheus's bounded contexts. Back to the index.

Types​

AlertState​

connectors_prometheus.rules.AlertState is one of inactive, pending and firing.

Rule​

connectors_prometheus.rules.Rule is a record of 12 fields:

  • group — String
  • group_interval_ms — Optional<Integer>, which may be absent
  • name — String
  • kind — connectors_prometheus.rules.RuleKind
  • query — String
  • labels — Map<String, String>
  • annotations — Map<String, String>
  • health — connectors_prometheus.rules.RuleHealth
  • last_error — Optional<String>, which may be absent
  • state — Optional<connectors_prometheus.rules.AlertState>, which may be absent
  • duration_ms — Optional<Integer>, which may be absent
  • active_alerts — Optional<Integer>, which may be absent

Every value satisfies (group.count >= 1 and group.count <= 1024), (name.count >= 1 and name.count <= 1024), (query.count >= 1 and query.count <= 16384), (last_error.count >= 1 and last_error.count <= 256), active_alerts >= 0, duration_ms >= 0, group_interval_ms >= 0 and ((kind == alerting and defined(state) and defined(active_alerts)) or (kind == recording and not (defined(state)) and not (defined(duration_ms)) and not (defined(active_alerts)))).

RuleHealth​

connectors_prometheus.rules.RuleHealth is one of ok, err and unknown.

RuleKind​

connectors_prometheus.rules.RuleKind is one of alerting and recording.

RulesSelection​

connectors_prometheus.rules.RulesSelection is a record of one field:

  • kind — Optional<connectors_prometheus.rules.RuleKind>, which may be absent

Two of the types above are reached by nothing else in this system: connectors_prometheus.rules.Rule and connectors_prometheus.rules.RulesSelection. No entity, view, command, event, error or crossing names them, so it is either vocabulary something outside this specification uses or a leftover — and only a person can tell which.


Generated from connectors_prometheus v1 · model digest 5a394966bc5849079b110e96a78cbdd0e0f71db4e76dbe085d6826e6c18c9495 · contract digest slice-sha256/2:861f7d9cc546615b06195be8d9def94ea14a45010d34a3b7b140de81459bab6f. Do not edit this file; change the specification and regenerate it with ess generate.