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

[Synthetics] Remove auto-creation of default monitor status and TLS alerts #196391

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

justinkambic
Copy link
Contributor

@justinkambic justinkambic commented Oct 15, 2024

Summary

Resolves #193610.

This PR overhauls the way that we check for rules to display in the UI. This is necessitated because we are no longer automatically generating rules, and the global rules we can use are of the same type as the customizable rules users can define.

UI changes

  • We will display a callout to the user notifying them that there are no Monitor Status rules, if they have any monitor running with alerting enabled.
  • We will display a callout to the user notifying them that there are no TLS rules, if they have HTTP monitors defined (with alerting enabled) but no TLS alerts running.
  • We will display a callout to the user if there's no default connector defined.

This is very similar to what we already do, but the method of querying the data has changed, and it's stored in the application state now.

Backend changes

Users can still create the default alerts, and thus the API for this is still present, but it's not called by default anymore. If the user navigates to Synthetics and starts creating monitors, they'll eventually be prompted by the callouts above. We do plan to follow this up with a better UI experience, which we have designs for, but I will create that as an enhancement ticket linked to this one that we can prioritize later. These changes are largely in line with what the current experience is, so this is not regressive.

We have also removed defaultStatusRuleEnabled and defaultTLSRuleEnabled from the settings saved object definition, per the requirements in the linked ticket.

Checklist co-opted from the linked issue

  • The default monitor status and tls rules should no longer be created when the user visits the Synthetics app
  • In the Settings view, the toggles to enable and disable the rule should be removed
  • References to the status/tls rule enabled settings (defaultStatusRuleEnabled and defaultTlsRuleEnabled) within the Synthetics saved object should be removed from the code base, particularly from the default_alert_service.ts file.
  • Default rules, both TLS and Monitor Status, should be able to be enabled/disabled and deleted from the Rule management page
  • If a Synthetics monitor status rule is not present, either the default or a custom rule, a callout should be displayed on the Synthetics overview page with a call to action button to create either the default alert or a custom alert.
  • If the default TLS rule is not present, the callout should also include a call to action to create a TLS rule

Code is WIP.

@justinkambic justinkambic added v9.0.0 release_note:feature Makes this part of the condensed release notes backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) Team:obs-ux-management Observability Management User Experience Team v8.17.0 labels Oct 15, 2024
@justinkambic justinkambic self-assigned this Oct 15, 2024
@justinkambic justinkambic force-pushed the 193610/default-alerts branch from 16b908a to 9eda881 Compare October 30, 2024 18:11
@justinkambic justinkambic marked this pull request as ready for review November 18, 2024 16:51
@justinkambic justinkambic requested review from a team as code owners November 18, 2024 16:51
@elasticmachine
Copy link
Contributor

Pinging @elastic/obs-ux-management-team (Team:obs-ux-management)

@botelastic botelastic bot added the ci:project-deploy-observability Create an Observability project label Nov 18, 2024
Copy link
Contributor

🤖 GitHub comments

Expand to view the GitHub comments

Just comment with:

  • /oblt-deploy : Deploy a Kibana instance using the Observability test environments.
  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@justinkambic justinkambic force-pushed the 193610/default-alerts branch 3 times, most recently from 4dec151 to 2773205 Compare November 26, 2024 16:42
Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

I think I would only display this if there is a DEFAULT rule present. The default connectors are irrelevant if there isn't any default rules. For example, if the user is only using custom rules, configuring default connectors is irrelevant.

image

In my opinion, this button should navigate to the observability rules management page

image

Copy link
Contributor

@dominiqueclarke dominiqueclarke left a comment

Choose a reason for hiding this comment

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

When I click on "create custom rule" and it's created, the callout remains until I refresh the page.

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 27, 2024

💔 Build Failed

Failed CI Steps

History

cc @justinkambic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-minor Backport to (8.x) the previous minor version (i.e. one version back from main) ci:project-deploy-observability Create an Observability project release_note:feature Makes this part of the condensed release notes Team:obs-ux-management Observability Management User Experience Team v8.17.0 v9.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Synthetics] Remove auto creation of Synthetics monitor status default rule
4 participants