opensearch-project / opensearch-project/alerting
Support timezone selection for monitor schedules set "By interval"
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 82
- Forks
- 133
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 9
Description
Is your feature request related to a problem? Please describe.
When scheduling a Monitor, I find it inconsistent that the 'By interval' type does not expose a Timezone field, just like the daily, weekly, monthly and custom cron expression do. Connected to that, on the monitor creation API (POST _opendistro/_alerting/monitors) if 'period' type is selected under 'schedule' then "timezone" field cannot be specified (I guess it's just ignored).
Describe the solution you'd like
Both UI and API should support the Timezone field.
- UI should expose the Timezone field on "By interval" schedule type, just like rest types.
- API should allow setting
"timezone": "America/Los_Angeles"under 'schedule' object for 'period' type, just like rest types.
Describe alternatives you've considered
An work-around is to use 'custom cron expression', which of course isn't as user-friendly as 'by interval', but certainly does the job.
Additional context
I'm using OpenDistro 1.13.2. I understand that this is a minor thing, especially since there is an easy and valid alternative. I'm just suggesting it because it creates inconsistency on user experience. Personally when I came up with timezone discrepancy in my alarms (configured on UI) I didn't even think that setting Timezone is possible with schedule types other than 'By interval'. That's a problem especially because 'By interval' is selected by default.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the monitor creation API, POST _opendistro/_alerting/monitors, and trace how a period schedule handles its timezone field. Then locate the UI implementation for the "By interval" schedule type. Done means both UI and API accept and apply a timezone for interval schedules, matching the other schedule types.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100