kibana/x-pack/examples/alerting_example
Jiawei Wu 092cc0d098
[RAM][Maintenance Window] Add maintenance window solution selection. (#166781)
## Summary
Resolves: https://github.com/elastic/kibana/issues/166301

Adds support for solution/category filtering to maintenance windows by
adding a new property: `category_ids`. Selecting one or more solutions
when creating/updating a maintenance window will cause the maintenance
window to only suppress rule types belonging to said solutions. In order
to achieve filtering by solution/category, we are adding a new field to
the rule types schema called `category`. This field should map to the
feature category that the rule type belongs to (`observability`,
`securitySolution` or `management`).

Our initial plan was to use feature IDs or rule type IDs to accomplish
this filtering, we decided against using rule type IDs because if a new
rule type gets added, we need to change the API to support this new rule
type. We decided against feature IDs because it's a very anti-serverless
way of accomplishing this feature, as we don't want to expose feature
IDs to APIs. We decided on app categories because it works well with
serverless and should be much easier to maintain if new rule types are
added in the future.

This means the `rule_types` API has to be changed to include this new
field, although it shouldn't be a breaking change since we're just
adding a new field. No migrations are needed since rule types are in
memory and maintenance windows are backwards compatible.


![image](d07b05cd-ade8-46a4-a4c0-ab623c31c11b)

### Error state:

![image](b61984b4-c1e1-4e9b-98b4-97a681e977a8)

### Checklist

Delete any items that are not applicable to this PR.

- [x] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [x]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
Co-authored-by: Dima Arnautov <arnautov.dima@gmail.com>
2023-10-02 09:20:53 +01:00
..
common fix all violations 2022-04-16 01:37:30 -05:00
public [ResponseOps] Migrate all usages of EuiPage*_Deprecated (#166188) 2023-09-12 15:57:40 +02:00
server [RAM][Maintenance Window] Add maintenance window solution selection. (#166781) 2023-10-02 09:20:53 +01:00
jest.config.js adds an example rule type example.pattern (#150068) 2023-02-07 10:33:12 -05:00
kibana.jsonc [packages] migrate all plugins to packages (#148130) 2023-02-08 21:06:50 -06:00
README.md [Response Ops] Renaming Alert to Rule (#129136) 2022-04-04 07:32:32 -04:00
tsconfig.json [Shared UX] Adoption of Shared UX Route component (#150357) 2023-02-14 19:25:04 +00:00

Alerting Example

This example plugin shows you how to create a custom Rule Type, create rules based on that type and corresponding UI for viewing the details of all the rules within the custom plugin.

To run this example, use the command yarn start --run-examples.