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

[ResponseOps][Rules] Move the params of SLO, observability, and logs rule types to the @kbn/response-ops-rule-params package #195191

Closed
4 tasks done
cnasikas opened this issue Oct 7, 2024 · 4 comments · Fixed by #205507 or #208686
Assignees
Labels
Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)

Comments

@cnasikas
Copy link
Member

cnasikas commented Oct 7, 2024

Towards #187356 we should move the parameters of the SLO, observability, and logs rule types to the @kbn/response-ops-rule-params package.

Blocked by: #195183

DoD

Preview Give feedback
@cnasikas cnasikas added Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams) labels Oct 7, 2024
@elasticmachine
Copy link
Contributor

Pinging @elastic/response-ops (Team:ResponseOps)

@cnasikas cnasikas changed the title [Rules] Move the params of SLO, observability, and logs rule types to the @kbn/response-ops-rule-params package [ResponseOps][Rules] Move the params of SLO, observability, and logs rule types to the @kbn/response-ops-rule-params package Oct 7, 2024
@guskovaue guskovaue self-assigned this Dec 16, 2024
guskovaue added a commit that referenced this issue Jan 28, 2025
…pes rule-params package (#205507)

Partly resolve: #195191 (cover
log threshold and slo burn rate)

For log threshold rule we decided to just copy paste rule parameters and
use it during registering rule, because existing schema is written using
'io-ts' library, but all our schemas should use '@kbn/config-schema' in
out rule-params package. We did it as a temp solution. I'll create a
follow up ticket to use our schema and inherited types everywhere in the
code.

For the custom threshold rule parameters will be added in separate PR
after I merging dataViewSpecSchema.

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Jan 28, 2025
…pes rule-params package (elastic#205507)

Partly resolve: elastic#195191 (cover
log threshold and slo burn rate)

For log threshold rule we decided to just copy paste rule parameters and
use it during registering rule, because existing schema is written using
'io-ts' library, but all our schemas should use '@kbn/config-schema' in
out rule-params package. We did it as a temp solution. I'll create a
follow up ticket to use our schema and inherited types everywhere in the
code.

For the custom threshold rule parameters will be added in separate PR
after I merging dataViewSpecSchema.

### Checklist

- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
(cherry picked from commit 9b17623)
@cnasikas
Copy link
Member Author

I am reopening the issue because the custom threshold rule type has not yet been moved.

@cnasikas cnasikas reopened this Jan 28, 2025
kibanamachine added a commit that referenced this issue Jan 28, 2025
…ule types rule-params package (#205507) (#208536)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[ResponseOps] Move the params of SLO, observability, and logs rule
types rule-params package
(#205507)](#205507)

<!--- Backport version: 9.4.3 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT
[{"author":{"name":"Julia","email":"iuliia.guskova@elastic.co"},"sourceCommit":{"committedDate":"2025-01-28T13:56:22Z","message":"[ResponseOps]
Move the params of SLO, observability, and logs rule types rule-params
package (#205507)\n\nPartly resolve:
#195191 (cover\r\nlog threshold
and slo burn rate)\r\n\r\nFor log threshold rule we decided to just copy
paste rule parameters and\r\nuse it during registering rule, because
existing schema is written using\r\n'io-ts' library, but all our schemas
should use '@kbn/config-schema' in\r\nout rule-params package. We did it
as a temp solution. I'll create a\r\nfollow up ticket to use our schema
and inherited types everywhere in the\r\ncode.\r\n\r\nFor the custom
threshold rule parameters will be added in separate PR\r\nafter I
merging dataViewSpecSchema.\r\n\r\n### Checklist\r\n\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or
tutorials\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Christos Nasikas
<christos.nasikas@elastic.co>","sha":"9b17623984dd6a18317ca0909ff00c3464eba383","branchLabelMapping":{"^v9.0.0$":"main","^v8.18.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","v9.0.0","backport:prev-minor","Team:obs-ux-infra_services","Team:obs-ux-management","v8.18.0"],"title":"[ResponseOps]
Move the params of SLO, observability, and logs rule types rule-params
package","number":205507,"url":"https://github.com/elastic/kibana/pull/205507","mergeCommit":{"message":"[ResponseOps]
Move the params of SLO, observability, and logs rule types rule-params
package (#205507)\n\nPartly resolve:
#195191 (cover\r\nlog threshold
and slo burn rate)\r\n\r\nFor log threshold rule we decided to just copy
paste rule parameters and\r\nuse it during registering rule, because
existing schema is written using\r\n'io-ts' library, but all our schemas
should use '@kbn/config-schema' in\r\nout rule-params package. We did it
as a temp solution. I'll create a\r\nfollow up ticket to use our schema
and inherited types everywhere in the\r\ncode.\r\n\r\nFor the custom
threshold rule parameters will be added in separate PR\r\nafter I
merging dataViewSpecSchema.\r\n\r\n### Checklist\r\n\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or
tutorials\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Christos Nasikas
<christos.nasikas@elastic.co>","sha":"9b17623984dd6a18317ca0909ff00c3464eba383"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/205507","number":205507,"mergeCommit":{"message":"[ResponseOps]
Move the params of SLO, observability, and logs rule types rule-params
package (#205507)\n\nPartly resolve:
#195191 (cover\r\nlog threshold
and slo burn rate)\r\n\r\nFor log threshold rule we decided to just copy
paste rule parameters and\r\nuse it during registering rule, because
existing schema is written using\r\n'io-ts' library, but all our schemas
should use '@kbn/config-schema' in\r\nout rule-params package. We did it
as a temp solution. I'll create a\r\nfollow up ticket to use our schema
and inherited types everywhere in the\r\ncode.\r\n\r\nFor the custom
threshold rule parameters will be added in separate PR\r\nafter I
merging dataViewSpecSchema.\r\n\r\n### Checklist\r\n\r\n- [
]\r\n[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)\r\nwas
added for features that require explanation or
tutorials\r\n\r\n---------\r\n\r\nCo-authored-by: kibanamachine
<42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by:
Christos Nasikas
<christos.nasikas@elastic.co>","sha":"9b17623984dd6a18317ca0909ff00c3464eba383"}},{"branch":"8.x","label":"v8.18.0","branchLabelMappingKey":"^v8.18.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Julia <iuliia.guskova@elastic.co>
@maryam-saeidi
Copy link
Member

Does this mean every new rule that will be created needs to define its parameters in @kbn/response-ops-rule-params package?

@cnasikas
Copy link
Member Author

Yes, this is correct. Each new rule type must define its parameters in @kbn/response-ops-rule-params. One of the main reasons is that we need to generate OAS without running Kibana. Using the rule registry to construct the parameters would require Kibana to run.

kibanamachine pushed a commit to kibanamachine/kibana that referenced this issue Feb 4, 2025
…ic#208686)

Fixes: elastic#195191

Move log threshold rule type params to the new package.

P.S.: I've moved function `validateKQLStringFilter` and test for it in
my previous PR: elastic#205507

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
(cherry picked from commit 07557b6)
drewdaemon pushed a commit to drewdaemon/kibana that referenced this issue Feb 6, 2025
…ic#208686)

Fixes: elastic#195191

Move log threshold rule type params to the new package.

P.S.: I've moved function `validateKQLStringFilter` and test for it in
my previous PR: elastic#205507

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Alerting/RulesFramework Issues related to the Alerting Rules Framework Team:ResponseOps Label for the ResponseOps team (formerly the Cases and Alerting teams)
Projects
None yet
4 participants