elastic / uptime

This project includes resources and general issue tracking for the Elastic Uptime solution
12 stars 3 forks source link

[META] Suite Discovery / Monitor Management Integration #432

Closed andrewvc closed 2 years ago

andrewvc commented 2 years ago

Suites, today, operate in a stateless manner, and have a number of UX shortcomings especially when it comes to error reporting (see https://github.com/elastic/beats/issues/27924). This issue is the longer term fix for https://github.com/elastic/uptime/issues/425.

The proposed fix here (originally @drewpost 's recommendation) is to use suites to control the monitor management objects in Uptime.

Implementation issues

Goals

The goal here is reduce the impedance mismatch between suites and inline monitors while still enabling a git-ops based workflow.

Personas

User Stories

This is a partial list of stories covered by this change

Implementation

At a logical level we will need to decouple suite journey discovery from execution, leading to the following flow:

  1. Suite refresh interval triggered
  2. Suite is downloaded
  3. Suite is unpacked and journeys discovered via --dry-run
  4. Existing monitors no longer defined in the suite are deleted (possibly as a soft delete) in kibana management
  5. Newly created monitors are added, existing ones are updated
  6. Monitors created from this process cannot be deleted or updated, though they may be disabled.

In terms of code, consider the following straw-man approach:

  1. When a zip url monitor is configured it now no executes journeys, but emits a manifest document to ES describing which journeys were discovered in the zip
  2. A kibana background job checks for the latest manifest documents and uses them to update central monitor management
  3. These newly configured monitors act as zip monitors currently do, filtering only for the journey they are set to run.

This would look something like:

image

The desirable properties of this approach are that:

Needs design etc. CC @liciavale

vigneshshanmugam commented 2 years ago

Had some conversations with Andrew regarding the approach listed here vs https://github.com/elastic/beats/issues/29709, Even though the manifest proposal explained here is a bit complex than the other one, it does have better control over the journeys/monitors that are created via suites. It solves both the personas listed above and allows more fine tuning on the journey level.

Needs solving

Options

andrewvc commented 2 years ago

Closing in favor of https://github.com/elastic/synthetics/issues/470