Skip to content

feat(alerts): add re-notify interval as option, stop notifying on every evaluation - #2754

Open
niladrix719 wants to merge 5 commits into
hyperdxio:mainfrom
niladrix719:alert-renotify-interval#2464
Open

feat(alerts): add re-notify interval as option, stop notifying on every evaluation#2754
niladrix719 wants to merge 5 commits into
hyperdxio:mainfrom
niladrix719:alert-renotify-interval#2464

Conversation

@niladrix719

Copy link
Copy Markdown
Contributor

Summary

Adds a renotifyIntervalMinutes alert setting and changes the default so alerts stop re-notifying on every evaluation while firing, unset notifies once on the OK→ALERT transition, 0 restores the old every-evaluation behavior, and N re-notifies every N minutes.

fixes #2464

Screenshots or video

Screenshot 2026-07-30 at 12 14 08 PM

How to test on Vercel preview

The "Re-notify every" field lives in the saved-search alert modal (DBSearchPage.tsx) and the dashboard tile alert editor (ChartEditorControls.tsx), both gated behind !IS_LOCAL_MODE. The Vercel preview build runs in LOCAL_MODE

Signed-off-by: Niladri Adhikary <niladrix719@gmail.com>
@vercel

vercel Bot commented Jul 30, 2026

Copy link
Copy Markdown

@niladrix719 is attempting to deploy a commit to the HyperDX Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c316ffa

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@greptile-apps

greptile-apps Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

Adds configurable repeat notifications for firing alerts.

  • Persists and exposes renotifyIntervalMinutes through alert models, validation schemas, API responses, and OpenAPI documentation.
  • Tracks the last successful notification per alert group and uses it to suppress or schedule repeated firing notifications.
  • Adds the setting to saved-search and dashboard-tile alert editors.
  • Adds integration coverage for transition-only, every-evaluation, interval-based, and post-resolution notifications.

Confidence Score: 5/5

The PR appears safe to merge.

The previously reported delivery-failure issue is resolved because failed or silenced sends now return false, and both firing paths update lastNotifiedAt only after a successful send, leaving the next evaluation eligible to retry.

Important Files Changed

Filename Overview
packages/api/src/tasks/checkAlerts/index.ts Adds successful-delivery-aware notification timing and interval gating for grouped and ungrouped alerts.
packages/api/src/models/alertHistory.ts Persists the timestamp of the most recent successful firing notification.
packages/api/src/models/alert.ts Adds the non-negative optional re-notification interval to the alert model.
packages/api/src/tasks/checkAlerts/tests/checkAlerts.int.test.ts Covers transition-only, every-evaluation, timed repeat, and renewed post-resolution notification behavior.
packages/app/src/components/AlertScheduleFields.tsx Adds the advanced re-notification interval input and its user-facing behavior guidance.
packages/common-utils/src/types.ts Extends shared alert schemas with the nullable non-negative interval field.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  E[Alert evaluation breaches threshold] --> U{Unresolved notification exists?}
  U -->|No| S[Send firing notification]
  U -->|Yes| R{Re-notify setting}
  R -->|Unset| K[Skip repeat]
  R -->|0| S
  R -->|Positive interval elapsed| S
  R -->|Positive interval not elapsed| K
  S --> D{Delivery succeeds?}
  D -->|Yes| T[Persist lastNotifiedAt]
  D -->|No| F[Leave notification clock unchanged]
  T --> N[Next evaluation]
  F --> N
  K --> N
  N --> O{Alert returns to OK?}
  O -->|Yes| V[Send resolve notification]
  O -->|No| E
Loading

Reviews (4): Last reviewed commit: "fix: missing field in test" | Re-trigger Greptile

niladrix719 and others added 3 commits July 30, 2026 12:22
Signed-off-by: Niladri Adhikary <niladrix719@gmail.com>
Signed-off-by: Niladri Adhikary <niladrix719@gmail.com>
@niladrix719 niladrix719 changed the title feat(alerts): add re-notify interval, stop notifying on every evaluation feat(alerts): add re-notify interval as option, stop notifying on every evaluation Jul 30, 2026
Signed-off-by: Niladri Adhikary <niladrix719@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Alerts re-notify on every evaluation while firing

2 participants