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] Project monitors - prevent project monitors from being saved with Synthetics-UI incompatible schedules (consolidate) #142655
Comments
Pinging @elastic/uptime (Team:uptime) |
@dominiqueclarke does "...add validation..." mean to the Kibana endpoint for Synthetics CLI |
We send errors back to the synthetics agent client for various things. I'd like to include this in the errors we send back. It's best to handle the validation from both sides, in my opinion. The Kibana server will always have knowledge of what is and isn't supported in that version of Kibana, whereas the synthetics-agent could be operating on outdated information in an outdated version. Also, based on elastic/synthetics#620, it appears that the types will be updated to for browser monitors to give users some guidance, but it's not clear to me if this will actually prevent pushes. |
Added validation for both Browser and lightweight monitors. Users will not be able to push monitors to Kibana unless the schedule is changed to match with the allowed values. |
@dominiqueclarke with the decision to have a single, consolidated set of allowable schedules, and the validation added to the Synthetics Agent (here), I assume this is what we'll be implementing in the Kibana validation (i.e. not the ability for different schedules between lightweight and browser, which is in the current description)? Also, can this issue include changing the drop down options in the Synthetics UI to match the new list of options, or would you rather a separate issue (e.g. the current browser monitor allows a 4 hour frequency to be set)? |
I've updated the issue to reflect updating the dropdown. |
Added to the description:
|
See #142653 (comment) for a standard set of frequencies |
…deprecated zip url fields (#154010) ## Summary Relates to #142655 Resolves #142653 All monitor schedules in Uptime Monitor Management/Synthetics app apart from the [supported schedules](https://github.com/elastic/kibana/pull/154010/files#diff-6e5ef49468e646b5569e213b03876de143291ca3870a7092974793837f1ddc61R33) have been deprecated. The only allowed schedules are the below: <img width="1241" alt="Screen Shot 2023-04-02 at 10 28 20 PM" src="https://user-images.githubusercontent.com/11356435/229397972-fe2fcaa2-d3c7-450b-9b40-f8c71e6c7dcf.png"> Adds a migration to transform unsupportes schedules from Uptime Monitor Management to supported Synthetics app schedules. Also adds validation when an invalid schedule is used. Also removes zip url fields from monitors. These fields were originally included in the saved object spec anticipating a future zip url feature. That feature has now been replaced by project monitors, removing the need for zip url fields. ## Testing⚠️ Note⚠️ -- It's suggested that you use a fresh instance of ES to test this PR. This can either be done by creating a brand new oblt cluster via oblt-cli, or by running `yarn es snapshot`. If you run this PR on an existing oblt-cluster, then switch back to main on that same cluster before this PR is broken, you'll break the cluster. Instructions -- 1. Check out 8.7.0 2. Create Uptime monitors with invalid schedules. Ideally, create one of each monitor type. Some example invalid schedules are 4, 8, 11, and 16, for example. 3. Create at least one of each type of project monitor by pushing monitors via the synthetics agent 4. Check out this branch 5. Navigate to Synthetics or Uptime once Kibana is done loading. Observe that each one of the invalid schedules was transformed into a supported schedule. 6. (Testing that decryption is still working after migration). Navigate to each one of the UI monitors' edit pages. Click save to resave each monitor. Then, visit the edit page again. If you don't see any page level errors, decryption is still working successfully 7. (Testing that decryption is still working after migration for project monitors). Change the global schedule your project monitors and repush. Check the global schedule of your project monitors one more time and repush again. If both pushes are successful, decryption is still working after the migration. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
Closed by #154010 |
…deprecated zip url fields (elastic#154010) ## Summary Relates to elastic#142655 Resolves elastic#142653 All monitor schedules in Uptime Monitor Management/Synthetics app apart from the [supported schedules](https://github.com/elastic/kibana/pull/154010/files#diff-6e5ef49468e646b5569e213b03876de143291ca3870a7092974793837f1ddc61R33) have been deprecated. The only allowed schedules are the below: <img width="1241" alt="Screen Shot 2023-04-02 at 10 28 20 PM" src="https://user-images.githubusercontent.com/11356435/229397972-fe2fcaa2-d3c7-450b-9b40-f8c71e6c7dcf.png"> Adds a migration to transform unsupportes schedules from Uptime Monitor Management to supported Synthetics app schedules. Also adds validation when an invalid schedule is used. Also removes zip url fields from monitors. These fields were originally included in the saved object spec anticipating a future zip url feature. That feature has now been replaced by project monitors, removing the need for zip url fields. ## Testing⚠️ Note⚠️ -- It's suggested that you use a fresh instance of ES to test this PR. This can either be done by creating a brand new oblt cluster via oblt-cli, or by running `yarn es snapshot`. If you run this PR on an existing oblt-cluster, then switch back to main on that same cluster before this PR is broken, you'll break the cluster. Instructions -- 1. Check out 8.7.0 2. Create Uptime monitors with invalid schedules. Ideally, create one of each monitor type. Some example invalid schedules are 4, 8, 11, and 16, for example. 3. Create at least one of each type of project monitor by pushing monitors via the synthetics agent 4. Check out this branch 5. Navigate to Synthetics or Uptime once Kibana is done loading. Observe that each one of the invalid schedules was transformed into a supported schedule. 6. (Testing that decryption is still working after migration). Navigate to each one of the UI monitors' edit pages. Click save to resave each monitor. Then, visit the edit page again. If you don't see any page level errors, decryption is still working successfully 7. (Testing that decryption is still working after migration for project monitors). Change the global schedule your project monitors and repush. Check the global schedule of your project monitors one more time and repush again. If both pushes are successful, decryption is still working after the migration. --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
In Uptime Monitor Management UI, users could choose any schedule in minutes.
In the Synthetics UI, we only allow specific schedule values.
To ensure that project monitors remain compatible with Synthetics UI, we should add validation that prevents saving monitors with Synthetics-UI incompatible schedules.
The allowed schedules should be a standard set for both lightweight and browser monitors.
The Synthetics UI dropdown should be updated to reflect the new values.
Clarify in the release note, the standard and only accepted set of frequencies
The text was updated successfully, but these errors were encountered: