Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Alerting] Add outside range ("is not between") comparator to UI #64220

Closed
Zacqary opened this issue Apr 22, 2020 · 3 comments
Closed

[Alerting] Add outside range ("is not between") comparator to UI #64220

Zacqary opened this issue Apr 22, 2020 · 3 comments
Labels
enhancement New value added to drive a business result Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@Zacqary
Copy link
Contributor

Zacqary commented Apr 22, 2020

In #63993 Metrics added a custom comparator called OUTSIDE_RANGE, which basically acts as the opposite of BETWEEN. Instead of alerting when a value is >= x && <= y, it alerts when a value is < x || > y.

This can be added to builtInComparators and removed from Metrics' customComparators so that all alert types can make use of it.

@Zacqary Zacqary added enhancement New value added to drive a business result Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Apr 22, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-alerting-services (Team:Alerting Services)

@pmuellr
Copy link
Member

pmuellr commented Apr 22, 2020

We already have this in the API - it seemed like it was missing when I added the index threshold comparators, but we didn't end up adding it to the UI:

function getComparatorFns(): Map<string, ComparatorFn> {
const fns: Record<string, ComparatorFn> = {
'<': (value: number, threshold: number[]) => value < threshold[0],
'<=': (value: number, threshold: number[]) => value <= threshold[0],
'>=': (value: number, threshold: number[]) => value >= threshold[0],
'>': (value: number, threshold: number[]) => value > threshold[0],
between: (value: number, threshold: number[]) => value >= threshold[0] && value <= threshold[1],
notBetween: (value: number, threshold: number[]) =>
value < threshold[0] || value > threshold[1],
};

@Zacqary Zacqary changed the title [Alerting] Add outside range ("is not between") comparator [Alerting] Add outside range ("is not between") comparator to UI Apr 22, 2020
@Zacqary
Copy link
Contributor Author

Zacqary commented Apr 22, 2020

@pmuellr Updated issue to reflect that this needs to be added to the UI

@Zacqary Zacqary closed this as completed Feb 2, 2021
@kobelb kobelb added the needs-team Issues missing a team label label Jan 31, 2022
@botelastic botelastic bot removed the needs-team Issues missing a team label label Jan 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
Development

No branches or pull requests

4 participants