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

Migrate Uptime to new Alerting APIs #95839

Closed
ymao1 opened this issue Mar 30, 2021 · 6 comments · Fixed by #107863
Closed

Migrate Uptime to new Alerting APIs #95839

ymao1 opened this issue Mar 30, 2021 · 6 comments · Fixed by #107863
Labels
blocker Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability test-plan test-plan-ok issue has passed test plan v7.15.0 v8.0.0

Comments

@ymao1
Copy link
Contributor

ymao1 commented Mar 30, 2021

As part of the effort to update the Alerting terminology, the Alerting team has created new HTTP APIs using the rules terminology and deprecated the existing HTTP APIs that reference alerts.

The new APIs are documented here: https://www.elastic.co/guide/en/kibana/master/alerting-apis.html
The deprecated APIs are documented here: https://www.elastic.co/guide/en/kibana/master/alerts-api.html and will remain until 8.0 when they will be removed.

This issue is to remove usage of the legacy APIs from Uptime.
Note that in addition to route changes, API parameters have also been converted to snake case to conform to the style guide

@ymao1 ymao1 added Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability v8.0.0 labels Mar 31, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/uptime (Team:uptime)

@ymao1 ymao1 added the Team:APM All issues that need APM UI Team support label Mar 31, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@mikecote
Copy link
Contributor

We will need this done, merged and backported before 7.15.0 feature freeze so we can remove the code in the 7.16/8.0 release cycle.

@dominiqueclarke
Copy link
Contributor

dominiqueclarke commented Jul 26, 2021

We are using 3 soon to be deprecated apis. The routes are defined in x-pack/plugins/uptime/common/constants/rest_api.ts and used in x-pack/plugins/uptime/public/state/api/alerts.ts.

POST /api/alerts/alert
DELETE /api/alerts/alert/{id}
GET /api/alerts/_find

We will need to update them according to the specs laid out in #90377

  • POST /api/alerts/alert => /api/alerting/rule
  • GET /api/alerts/_find => /api/alerting/rules/_find
  • DELETE /api/alerts/alert/{id} => /api/alerting/rule/{id}

@dominiqueclarke
Copy link
Contributor

@mikecote Do you have new Rule types defined for the new snake case rule parameters. I see the Alert type at x-pack/plugins/alerting/common/alert.ts, but I can't find a corresponding new type for the new terminology and schema.

@mikecote
Copy link
Contributor

@dominiqueclarke

@mikecote Do you have new Rule types defined for the new snake case rule parameters. I see the Alert type at x-pack/plugins/alerting/common/alert.ts, but I can't find a corresponding new type for the new terminology and schema.

Not at this time, our first pass at the terminology change was to rename anything user-facing and breaking (like HTTP APIs). The renaming in the code will happen at a future time and most likely be done all at once as a search and replace. You can keep using AlertType TS definitions for now 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker Team:APM All issues that need APM UI Team support Team:Uptime - DEPRECATED Synthetics & RUM sub-team of Application Observability test-plan test-plan-ok issue has passed test plan v7.15.0 v8.0.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants