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

change shape of alert.interval to accomodate future scheduling flavors #52808

Closed
pmuellr opened this issue Dec 11, 2019 · 1 comment · Fixed by #52873
Closed

change shape of alert.interval to accomodate future scheduling flavors #52808

pmuellr opened this issue Dec 11, 2019 · 1 comment · Fixed by #52873
Assignees
Labels
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.6.0

Comments

@pmuellr
Copy link
Member

pmuellr commented Dec 11, 2019

For alerts, we currently have a top-level interval: string property (eg, "1s" or "2m") to set the scheduling of when the alert function is run. We're 99.9% sure we'll want more in the future, the first (and maybe last) being a "cron" formatted string.

Watcher has a fairly elaborate story for scheduling options, documented here: https://www.elastic.co/guide/en/elasticsearch/reference/current/trigger-schedule.html

The full trigger "schema" for watcher is a bit overboard, but just to handle cron we'll need to do something, and it's not hard to imagine adding a few simple shortcuts like { daily: ['01:00', '11:00'] }(every day at 1am and 1pm).

Current thought is to create a top-level property schedule or sked or whatever, and move the current interval property under that. Once we add cron support, we'd allow a new cron property under schedule (presumably only supporting one at a time in the same schedule object). If we add a daily per example above, we'd add another property under schedule, etc.

This is a change to the SO, but until 7.6 ships we don't need to worry about migrations, and after 7.6 we do, so it would be nice tot have in 7.6. Same for API input/output, and for the same reason would be nice to have a future-friendly version in 7.6.

Other options include having a intervalType property, which today would be interval (by default), and then interval would be interpreted relative to that. Feels a little hacky, and also means we'd have to force-fit the value to a string, if a future type wanted something just a little richer, like the daily example above (eg, storing that as a JSON string).

Task Manager has a similar issue #51472 and it would be nice for both to use the same pattern.

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-stack-services (Team:Stack Services)

@bmcconaghy bmcconaghy added Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) and removed Team:Stack Services labels Dec 12, 2019
@pmuellr pmuellr added this to In Progress in Make it Action Dec 16, 2019
@mikecote mikecote moved this from In Progress to Done (Ordered by most recent) in Make it Action Dec 18, 2019
@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
Feature:Alerting Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) v7.6.0
Projects
No open projects
Make it Action
  
Done (Ordered by most recent)
Development

Successfully merging a pull request may close this issue.

5 participants