From 0361f07ce21d319e5806734c7e7e2b877a680c38 Mon Sep 17 00:00:00 2001 From: Lisa Cawley Date: Fri, 7 Jul 2023 08:02:08 -0700 Subject: [PATCH] [8.8] [DOCS] Remove deprecated action variables from rule APIs (#161216) (#161378) # Backport This will backport the following commits from `main` to `8.8`: - [[DOCS] Remove deprecated action variables from rule APIs (#161216)](https://github.com/elastic/kibana/pull/161216) ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) \n\n### Questions ?\nPlease refer to the [Backport tool\ndocumentation](https://github.com/sqren/backport)\n\n\n\nCo-authored-by: Lisa Cawley "}},{"branch":"main","label":"v8.10.0","labelRegex":"^v8.10.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/161216","number":161216,"mergeCommit":{"message":"[DOCS] Remove deprecated action variables from rule APIs (#161216)","sha":"8afb9b086cb9a21601f1f0a4a0106aaebedb3b69"}}]}] BACKPORT--> Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> --- docs/api/alerting/create_rule.asciidoc | 4 ++-- docs/api/alerting/get_rules.asciidoc | 2 +- docs/api/alerting/legacy/create.asciidoc | 4 ++-- .../alerting/docs/openapi/bundled.json | 12 +++++----- .../alerting/docs/openapi/bundled.yaml | 24 +++++++++---------- .../examples/create_rule_request.yaml | 2 +- .../examples/create_rule_response.yaml | 2 +- .../examples/find_rules_response.yaml | 2 +- .../examples/get_rule_response.yaml | 2 +- .../examples/update_rule_request.yaml | 2 +- .../examples/update_rule_response.yaml | 2 +- 11 files changed, 29 insertions(+), 29 deletions(-) diff --git a/docs/api/alerting/create_rule.asciidoc b/docs/api/alerting/create_rule.asciidoc index 590c33e895ea7..c5e5bec9d061f 100644 --- a/docs/api/alerting/create_rule.asciidoc +++ b/docs/api/alerting/create_rule.asciidoc @@ -173,7 +173,7 @@ POST api/alerting/rule "group":"threshold met", "params":{ "level":"info", - "message":"alert '{{alertName}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + "message":"Rule '{{rule.name}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" } } ], @@ -231,7 +231,7 @@ The API returns the following: "id": "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2", "params": { "level": "info", - "message": "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + "message": "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" }, "connector_type_id": ".server-log" } diff --git a/docs/api/alerting/get_rules.asciidoc b/docs/api/alerting/get_rules.asciidoc index fd291617e08d3..60c879116948a 100644 --- a/docs/api/alerting/get_rules.asciidoc +++ b/docs/api/alerting/get_rules.asciidoc @@ -103,7 +103,7 @@ The API returns the following: "id":"1007a0c0-7a6e-11ed-89d5-abec321c0def", "params":{ "level":"info", - "message":"alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + "message":"Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" }, "connector_type_id":".server-log" }], diff --git a/docs/api/alerting/legacy/create.asciidoc b/docs/api/alerting/legacy/create.asciidoc index 8363569541356..18594b0b67f4b 100644 --- a/docs/api/alerting/legacy/create.asciidoc +++ b/docs/api/alerting/legacy/create.asciidoc @@ -127,7 +127,7 @@ $ curl -X POST api/alerts/alert -H 'kbn-xsrf: true' -H 'Content-Type: applicati "group":"threshold met", "params":{ "level":"info", - "message":"alert '{{alertName}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + "message":"Rule '{{rule.name}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" } } ], @@ -175,7 +175,7 @@ The API returns the following: "group": "threshold met", "params": { "level": "info", - "message": "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + "message": "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" }, "id": "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2" } diff --git a/x-pack/plugins/alerting/docs/openapi/bundled.json b/x-pack/plugins/alerting/docs/openapi/bundled.json index d13e585753b29..7556c8f055e1c 100644 --- a/x-pack/plugins/alerting/docs/openapi/bundled.json +++ b/x-pack/plugins/alerting/docs/openapi/bundled.json @@ -3157,7 +3157,7 @@ "uuid": "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61", "params": { "level": "info", - "message": "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}", + "message": "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}", "connector_type_id": ".server-log" }, "connector_type_id": ".server-log", @@ -3196,7 +3196,7 @@ "id": "96b668d0-a1b6-11ed-afdf-d39a49596974", "params": { "level": "info", - "message": "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + "message": "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" } } ], @@ -3275,7 +3275,7 @@ "group": "threshold met", "params": { "level": "info", - "message": "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}" + "message": "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}" }, "id": "96b668d0-a1b6-11ed-afdf-d39a49596974", "uuid": "07aef2a0-9eed-4ef9-94ec-39ba58eb609d", @@ -3315,7 +3315,7 @@ "group": "threshold met", "params": { "level": "info", - "message": "alert '{{alertName}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + "message": "Rule '{{rule.name}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" } } ], @@ -3363,7 +3363,7 @@ }, "params": { "level": "info", - "message": "alert {{alertName}} is active for group {{context.group} :\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + "message": "Rule {{rule.name}} is active for group {{context.group} :\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" } } ], @@ -3472,7 +3472,7 @@ "uuid": "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61", "params": { "level": "info", - "message": "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}", + "message": "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}", "connector_type_id": ".server-log" }, "frequency": { diff --git a/x-pack/plugins/alerting/docs/openapi/bundled.yaml b/x-pack/plugins/alerting/docs/openapi/bundled.yaml index cb3568f2b2fd4..d4824342187e2 100644 --- a/x-pack/plugins/alerting/docs/openapi/bundled.yaml +++ b/x-pack/plugins/alerting/docs/openapi/bundled.yaml @@ -2090,10 +2090,10 @@ components: params: level: info message: |- - alert {{alertName}} is active for group {{context.group}}: + Rule {{rule.name}} is active for group {{context.group}}: - Value: {{context.value}} - - Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}} + - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date} connector_type_id: .server-log connector_type_id: .server-log @@ -2124,10 +2124,10 @@ components: params: level: info message: |- - alert {{alertName}} is active for group {{context.group}}: + Rule {{rule.name}} is active for group {{context.group}}: - Value: {{context.value}} - - Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}} + - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date}} params: aggField: sheet.version @@ -2193,10 +2193,10 @@ components: params: level: info message: |- - alert {{alertName}} is active for group {{context.group}}: + Rule {{rule.name}} is active for group {{context.group}}: - Value: {{context.value}} - - Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}} + - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date} id: 96b668d0-a1b6-11ed-afdf-d39a49596974 uuid: 07aef2a0-9eed-4ef9-94ec-39ba58eb609d @@ -2228,10 +2228,10 @@ components: params: level: info message: |- - alert '{{alertName}}' is active for group '{{context.group}}': + Rule '{{rule.name}}' is active for group '{{context.group}}': - Value: {{context.value}} - - Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}} + - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date}} consumer: alerts name: my rule @@ -2269,10 +2269,10 @@ components: params: level: info message: |- - alert {{alertName}} is active for group {{context.group} : + Rule {{rule.name}} is active for group {{context.group} : - Value: {{context.value}} - - Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}} + - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date}} api_key_created_by_user: false api_key_owner: elastic @@ -2364,10 +2364,10 @@ components: params: level: info message: |- - alert {{alertName}} is active for group {{context.group}}: + Rule {{rule.name}} is active for group {{context.group}}: - Value: {{context.value}} - - Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}} + - Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}} - Timestamp: {{context.date}} connector_type_id: .server-log frequency: diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_request.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_request.yaml index 1b09d410667d5..801d298c5f922 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_request.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_request.yaml @@ -8,7 +8,7 @@ value: group: threshold met params: level: info - message: "alert '{{alertName}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + message: "Rule '{{rule.name}}' is active for group '{{context.group}}':\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" consumer: alerts name: my rule params: diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_response.yaml index c29389cada936..cf755e08d3bfd 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_response.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/examples/create_rule_response.yaml @@ -11,7 +11,7 @@ value: throttle: null params: level: info - message: "alert {{alertName}} is active for group {{context.group} :\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + message: "Rule {{rule.name}} is active for group {{context.group} :\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" api_key_created_by_user: false api_key_owner: elastic consumer: alerts diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/find_rules_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/find_rules_response.yaml index a4f82165ed7a0..b6af1580d8e40 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/examples/find_rules_response.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/examples/find_rules_response.yaml @@ -47,7 +47,7 @@ value: uuid: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 params: level: info - message: "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + message: "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" connector_type_id: .server-log frequency: summary: false diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/get_rule_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/get_rule_response.yaml index cdd0185115fba..98d2a4462ead5 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/examples/get_rule_response.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/examples/get_rule_response.yaml @@ -44,7 +44,7 @@ value: uuid: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61 params: level: info - message: "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}" + message: "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}" connector_type_id: .server-log connector_type_id: .server-log frequency: diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_request.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_request.yaml index 20ee916284ed0..80462cc4d4db3 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_request.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_request.yaml @@ -8,7 +8,7 @@ value: id: 96b668d0-a1b6-11ed-afdf-d39a49596974 params: level: info - message: "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}}" + message: "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}}" params: aggField: sheet.version aggType: avg diff --git a/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_response.yaml b/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_response.yaml index 2d0f56a04b6b7..17a23811ec2e4 100644 --- a/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_response.yaml +++ b/x-pack/plugins/alerting/docs/openapi/components/examples/update_rule_response.yaml @@ -39,7 +39,7 @@ value: - group: threshold met params: level: info - message: "alert {{alertName}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}\n- Timestamp: {{context.date}" + message: "Rule {{rule.name}} is active for group {{context.group}}:\n\n- Value: {{context.value}}\n- Conditions Met: {{context.conditions}} over {{rule.params.timeWindowSize}}{{rule.params.timeWindowUnit}}\n- Timestamp: {{context.date}" id: 96b668d0-a1b6-11ed-afdf-d39a49596974 uuid: 07aef2a0-9eed-4ef9-94ec-39ba58eb609d connector_type_id: .server-log