Skip to content

Alerts re-notify on every evaluation while firing #2464

@filmon-arefayne

Description

@filmon-arefayne

A firing alert sends a notification on every evaluation interval for as long as the condition persists (e.g. every 5m).
For a sustained condition like high node memory, this produces a continuous stream of duplicate notifications until it resolves.
There's no setting to notify only on the OK→ALERT transition, nor a re-notification interval / cooldown.
This option would reduce massively the amount of alert we are receiving at the moment.

Current behavior (packages/api/src/tasks/checkAlerts/index.ts, HyperDX 2.27.0)
The ALERT notification is sent unconditionally whenever the threshold is exceeded:

if (doesExceedThreshold(alert, value)) {
  history.state = AlertState.ALERT;
  history.counts += 1;
  await trySendNotification({ state: AlertState.ALERT, ... });
}

By contrast, the resolve notification is edge-gated, firing only on the transition:

if (previousHistory?.state === AlertState.ALERT && currentHistory.state === AlertState.OK) {
  await trySendNotification({ state: AlertState.OK, ... });
}

Version: HyperDX 2.27.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions