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

[Heartbeat] Adds maintenance windows !! #41508

Merged
merged 49 commits into from
Feb 18, 2025

Conversation

shahzad31
Copy link
Contributor

@shahzad31 shahzad31 commented Nov 4, 2024

Proposed commit message

Added maintenance windows in heartbeat in RFC 5545 format using rrule-go library, this makes it compatible with kibana alerting maintenance windows which are using the same format https://www.elastic.co/guide/en/kibana/current/maintenance-windows.html

This will allow us to simple pass values from alerting maintenance windows where those are applicable to synthetics monitors as heartbeat configs

example being

heartbeat.monitors:

- type: http
  id: my-monitor
  urls: ["http://localhost:9200"]
  maintenance_windows:
    - freq: daily
      dtstart: "2024-11-04T01:00:00.000Z"
      interval: 1
      byweekday: [MO, TU, WE, TH, FR]
      duration: 3600000

Limitations

  • Only Daily, weekly, Monthly and Yearly Frequencies are allowed.
  • If DTStart is older than 2 years, it will throw error.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Disruptive User Impact

Author's Checklist

  • [ ]

How to test this PR locally

Related issues

Use cases

Screenshots

Logs

@shahzad31 shahzad31 requested review from a team as code owners November 4, 2024 14:54
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Nov 4, 2024
Copy link
Contributor

mergify bot commented Nov 4, 2024

This pull request does not have a backport label.
If this is a bug or security fix, could you label this PR @shahzad31? 🙏.
For such, you'll need to label your PR with:

  • The upcoming major version of the Elastic Stack
  • The upcoming minor version of the Elastic Stack (if you're not pushing a breaking change)

To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-8./d is the label to automatically backport to the 8./d branch. /d is the digit

Copy link
Contributor

mergify bot commented Nov 4, 2024

backport-8.x has been added to help with the transition to the new branch 8.x.
If you don't need it please use backport-skip label and remove the backport-8.x label.

@mergify mergify bot added the backport-8.x Automated backport to the 8.x branch with mergify label Nov 4, 2024
@pierrehilbert pierrehilbert added the Team:obs-ds-hosted-services Label for the Observability Hosted Services team label Nov 4, 2024
@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Nov 4, 2024
@elasticmachine
Copy link
Collaborator

Pinging @elastic/obs-ds-hosted-services (Team:obs-ds-hosted-services)

heartbeat/heartbeat.yml Outdated Show resolved Hide resolved
heartbeat/heartbeat.yml Outdated Show resolved Hide resolved
Copy link
Member

@cmacknz cmacknz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving go.mod changes.

Copy link
Contributor

mergify bot commented Nov 12, 2024

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b maintenance-windows upstream/maintenance-windows
git merge upstream/main
git push upstream maintenance-windows

Copy link
Collaborator

@emilioalvap emilioalvap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with suggestions 🚀

heartbeat/monitors/maintwin/maintwin.go Outdated Show resolved Hide resolved
heartbeat/monitors/maintwin/maintwin.go Outdated Show resolved Hide resolved
@emilioalvap
Copy link
Collaborator

/test

@shahzad31
Copy link
Contributor Author

/test

@shahzad31 shahzad31 merged commit f6fb08d into elastic:main Feb 18, 2025
144 checks passed
@shahzad31 shahzad31 deleted the maintenance-windows branch February 18, 2025 06:21
@shahzad31 shahzad31 removed the backport-8.x Automated backport to the 8.x branch with mergify label Feb 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Team:obs-ds-hosted-services Label for the Observability Hosted Services team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants