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] Only retry down monitors on first down check #36719

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

andrewvc
Copy link
Contributor

@andrewvc andrewvc commented Oct 2, 2023

Proposed commit message

When monitors go down we don't want to keep using retries when it was previously down, we only want to retry when it goes down the first time per the retries spec.

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.

Author's Checklist

How to test this PR locally

heartbeat.monitors:
- type: http
  # Set enabled to true (or delete the following line) to enable this monitor
  enabled: true
  # ID used to uniquely identify this monitor in Elasticsearch even if the config changes
  id: my-monitor
  # Human readable display name for this service in Uptime UI and elsewhere
  name: My Monitor
  # List of URLs to query
  urls: ["http://34.42.92.182/pattern?r=200x4,500x6"]
  # Configure task schedule
  schedule: '@every 10s'
  max_attempts: 2

This config should only show a double test on the first 500 (down), then single ones

Related issues

#36147

When monitors go down we don't want to keep using retries when
it was previously down, we only want to retry when it goes down
the first time per the retries spec.
@andrewvc andrewvc added bug Heartbeat Team:obs-ds-hosted-services Label for the Observability Hosted Services team backport-skip Skip notification from the automated backport with mergify labels Oct 2, 2023
@andrewvc andrewvc self-assigned this Oct 2, 2023
@andrewvc andrewvc requested a review from a team as a code owner October 2, 2023 12:32
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Oct 2, 2023
@elasticmachine
Copy link
Collaborator

Pinging @elastic/uptime (Team:Uptime)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Oct 2, 2023
@elasticmachine
Copy link
Collaborator

elasticmachine commented Oct 2, 2023

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2023-10-02T15:22:59.744+0000

  • Duration: 49 min 50 sec

Test stats 🧪

Test Results
Failed 0
Passed 2550
Skipped 28
Total 2578

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@vigneshshanmugam vigneshshanmugam merged commit 4b9ecac into elastic:main Oct 2, 2023
7 checks passed
@andrewvc andrewvc deleted the only-retry-on-state-change branch October 2, 2023 18:04
Scholar-Li pushed a commit to Scholar-Li/beats that referenced this pull request Feb 5, 2024
* [Heartbeat] Only retry down monitors on first down check

When monitors go down we don't want to keep using retries when
it was previously down, we only want to retry when it goes down
the first time per the retries spec.

* Update failing test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify bug Heartbeat 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.

3 participants