Skip to content

How to send recovered alerts according to the original alert state #160984

Open

Description

📝 Summary

In metric threshold and new threshold rules, we have two/three types of actions that can be generated:

As shown below, we have settings to control no data behavior for the metric threshold rule, but we are now removing this from the new threshold rule.
image

❓Question

Suppose that we have different actions for alert/warning/no data. In that case, how can we also send the recovered messages to the same group as we sent the alert?

Different action states An example scenario
image image

Previously, we had a field called originalAlertState in action context with the following logic:

const translateActionGroupToAlertState = (
  actionGroupId: string | undefined
): string | undefined => {
  if (actionGroupId === FIRED_ACTIONS.id) {
    return stateToAlertMessage[AlertStates.ALERT];
  }
  if (actionGroupId === NO_DATA_ACTIONS.id) {
    return stateToAlertMessage[AlertStates.NO_DATA];
  }
};

We don't want to save this information in AAD for the new rule, but we were wondering how this case can be covered when conditional actions are introduced.

Use-cases

  1. Separate warning recovered message
  2. Separate Recovered action conditions for Warning and Alert (145418) -> The issue was previously solved by adding an action context variable, check the related PR for more info.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions