-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Synthetics] copy alert state to alert context and implement alert recovery #128693
[Synthetics] copy alert state to alert context and implement alert recovery #128693
Conversation
df965ff
to
a8269d2
Compare
Pinging @elastic/uptime (Team:uptime) |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
…iniqueclarke/kibana into feature/uptime-alert-context
], | ||
state: [...commonMonitorStateI18, ...commonStateTranslations], | ||
}, | ||
isExportable: true, | ||
minimumLicenseRequired: 'basic', | ||
doesSetRecoveryContext: true, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this need to be set for other alert types?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested e2e and everything looks fine !!
Great work on this !!
@elasticmachine merge upstream |
…iniqueclarke/kibana into feature/uptime-alert-context
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
…covery (elastic#128693) * copy alert state to alert context * adjust alert translations * uptime - implement alert recovery * adjust tests * [CI] Auto-commit changed files from 'node scripts/eslint --no-cache --fix' * remove unused constant * update snapshot * add default recovery messages * update snapshot * add doesSetRecoveryContext to uptime duration anomaly alert Co-authored-by: Kibana Machine <[email protected]>
Summary
Resolves #128760
Resolves #128761
This PR takes the first step towards transitioning Uptime alerting towards preferring context over state. For more information about why this change is important, please visit the ticket.
For more information on the overall stages of the transition, please see #126280
Testing that State has been copied over to Context
oblt-cli
. This ensures you will have at least one monitor that is failing and one with an aging or expired certificate.Note
You'll likely want to set up control rules to ensure that the alert messages match our original implementation and still work for legacy users using state instead of context.
To do so, create two more rules, one for monitor status and one for tls. Adjust the alert message to the following. Ensure that the control (state) matches the test (context).
Monitor Status
TLS
Testing alert resolution
Monitor Status
Run When: Uptime Monitor Down
. ClickAdd action
again. This type changeRun When
toRecovered
. Confirm that the default content for recovery matches the AC defined in [Uptime] Specify alert recovery context #128761.4. Wait for the monitor alert to trigger. 5. Force the monitor to resolve by either A.) stopping heartbeat from running or deleting the monitor or B.) Changing the monitor config to a value that would trigger an UP status. 6. Confirm that you receive the alert recovery message to your specified action connector
TLS
oblt-cli
.4. Create a TLS status alert. Make sure you add an action for the when the alert is triggered as well as for when the alert is recovered. Confirm that the default content for recovery matches the AC defined in https://github.com//issues/128761. 5. Wait for the alert to trigger 6. Navigate back to Uptime Settings. Change age limit back to 730 days. 7. Confirm that you receive the alert recovery message to your specified action connector