Skip to content

Support Grafana advanced Expressions (Math / Reduce / Resample / Classic condition) #194

Description

@miguel-sanchez-elastic

Problem

Grafana alerts have two shapes:

  • With Advanced options off, the rule is a single "WHEN [reducer] OF query IS ABOVE N" — one reducer + one threshold. This is the common case and migrates today.
  • With Advanced options on, the Expressions section lets users chain steps — Math, additional Reduce steps, Resample, Classic condition — and the migration parks any such alert for manual review and does not create it.

Impact

Hand-built Grafana alerts that use Advanced options (Math, Classic condition, multi-step chains) don't migrate and must be rebuilt by hand.

Steps to reproduce

  1. Create an alert, enable Advanced options, and add a Classic condition (or a Math step).
  2. Migrate it.

Current behavior: parked for review, not created.

Scope of translation

  • Math (arithmetic/logic across steps) → expressible as arithmetic in the query. Translatable.
  • Classic condition (legacy reduce + threshold in one) → expressible as aggregate + threshold. Translatable.
  • Reduce variants beyond the simple form → aggregation in the query. Translatable.
  • Resample (re-align a series to a fixed step) → no Kibana equivalent. Not translatable — flag and warn.

Acceptance criteria

  • Math and Classic-condition alerts migrate to a working rule.
  • Multi-step Reduce chains migrate where the operations have query equivalents.
  • Resample (and any other untranslatable step) is clearly flagged with a reason instead of being silently parked.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    asset:alertsAlert, monitor, and rule migration assetsenhancementNew feature or requestphase:8Phase 8 - Broader coverage (complex cases)program:grafana-engineGrafana translator and engine correctnesssource:grafanaGrafana source migrationworkstream:translatorQuery, panel, and semantic translation capability

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions