Skip to content

Commit

Permalink
Merge branch '8.8' into backport/8.8/pr-157076
Browse files Browse the repository at this point in the history
  • Loading branch information
banderror authored May 20, 2023
2 parents 9f5e603 + 86ff1e6 commit 7a824c8
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 1 deletion.
11 changes: 11 additions & 0 deletions docs/api-generated/rules/rule-apis-passthru.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand All @@ -156,6 +157,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand Down Expand Up @@ -442,6 +444,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand All @@ -454,6 +457,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand Down Expand Up @@ -510,6 +514,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand All @@ -522,6 +527,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand Down Expand Up @@ -693,6 +699,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand All @@ -705,6 +712,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand Down Expand Up @@ -2053,6 +2061,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand All @@ -2065,6 +2074,7 @@ Any modifications made to this file will be overwritten.
"params" : {
"key" : ""
},
"uuid" : "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61",
"connector_type_id" : ".server-log",
"frequency" : {
"summary" : true,
Expand Down Expand Up @@ -2241,6 +2251,7 @@ Any modifications made to this file will be overwritten.
<div class="param">group (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The group name for the actions. If you don't need to group actions, set to <code>default</code>. </div>
<div class="param">id (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> The identifier for the connector saved object. </div>
<div class="param">params (optional)</div><div class="param-desc"><span class="param-type"><a href="#AnyType">map[String, oas_any_type_not_mapped]</a></span> The parameters for the action, which are sent to the connector. The <code>params</code> are handled as Mustache templates and passed a default set of context. </div>
<div class="param">uuid (optional)</div><div class="param-desc"><span class="param-type"><a href="#string">String</a></span> A universally unique identifier (UUID) for the action. </div>
</div> <!-- field-items -->
</div>
<div class="model">
Expand Down
9 changes: 9 additions & 0 deletions x-pack/plugins/alerting/docs/openapi/bundled.json
Original file line number Diff line number Diff line change
Expand Up @@ -2516,6 +2516,11 @@
"type": "object",
"description": "The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.",
"additionalProperties": true
},
"uuid": {
"type": "string",
"description": "A universally unique identifier (UUID) for the action.",
"example": "1c7a1280-f28c-4e06-96b2-e4e5f05d1d61"
}
}
}
Expand Down Expand Up @@ -3025,6 +3030,7 @@
{
"group": "threshold met",
"id": "1007a0c0-7a6e-11ed-89d5-abec321c0def",
"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}",
Expand Down Expand Up @@ -3142,6 +3148,7 @@
"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}"
},
"id": "96b668d0-a1b6-11ed-afdf-d39a49596974",
"uuid": "07aef2a0-9eed-4ef9-94ec-39ba58eb609d",
"connector_type_id": ".server-log",
"frequency": {
"summary": false,
Expand Down Expand Up @@ -3217,6 +3224,7 @@
{
"group": "threshold met",
"id": "dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2",
"uuid": "07aef2a0-9eed-4ef9-94ec-39ba58eb609d",
"frequency": {
"notify_when": "onActionGroupChange",
"summary": false,
Expand Down Expand Up @@ -3331,6 +3339,7 @@
{
"id": "9dca3e00-74f5-11ed-9801-35303b735aef",
"group": "threshold met",
"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}}",
Expand Down
8 changes: 8 additions & 0 deletions x-pack/plugins/alerting/docs/openapi/bundled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1603,6 +1603,10 @@ components:
type: object
description: The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.
additionalProperties: true
uuid:
type: string
description: A universally unique identifier (UUID) for the action.
example: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61
schedule:
type: object
description: The check interval, which specifies how frequently the rule conditions are checked. The interval is specified in seconds, minutes, hours, or days.
Expand Down Expand Up @@ -1990,6 +1994,7 @@ components:
actions:
- group: threshold met
id: 1007a0c0-7a6e-11ed-89d5-abec321c0def
uuid: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61
params:
level: info
message: |-
Expand Down Expand Up @@ -2097,6 +2102,7 @@ components:
- Conditions Met: {{context.conditions}} over {{params.timeWindowSize}}{{params.timeWindowUnit}}
- Timestamp: {{context.date}
id: 96b668d0-a1b6-11ed-afdf-d39a49596974
uuid: 07aef2a0-9eed-4ef9-94ec-39ba58eb609d
connector_type_id: .server-log
frequency:
summary: false
Expand Down Expand Up @@ -2157,6 +2163,7 @@ components:
actions:
- group: threshold met
id: dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2
uuid: 07aef2a0-9eed-4ef9-94ec-39ba58eb609d
frequency:
notify_when: onActionGroupChange
summary: false
Expand Down Expand Up @@ -2256,6 +2263,7 @@ components:
actions:
- id: 9dca3e00-74f5-11ed-9801-35303b735aef
group: threshold met
uuid: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61
params:
level: info
message: |-
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ value:
actions:
- group: threshold met
id: dceeb5d0-6b41-11eb-802b-85b0c1bc8ba2
uuid: 07aef2a0-9eed-4ef9-94ec-39ba58eb609d
frequency:
notify_when: onActionGroupChange
summary: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ value:
actions:
- id: 9dca3e00-74f5-11ed-9801-35303b735aef
group: threshold met
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}}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ value:
actions:
- group: threshold met
id: 1007a0c0-7a6e-11ed-89d5-abec321c0def
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}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ value:
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}"
id: 96b668d0-a1b6-11ed-afdf-d39a49596974
uuid: 07aef2a0-9eed-4ef9-94ec-39ba58eb609d
connector_type_id: .server-log
frequency:
summary: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ items:
type: object
description: The parameters for the action, which are sent to the connector. The `params` are handled as Mustache templates and passed a default set of context.
additionalProperties: true
uuid:
type: string
description: A universally unique identifier (UUID) for the action.
example: 1c7a1280-f28c-4e06-96b2-e4e5f05d1d61
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/constants/epm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export const FLEET_KUBERNETES_PACKAGE = 'kubernetes';
export const FLEET_UNIVERSAL_PROFILING_SYMBOLIZER_PACKAGE = 'profiler_symbolizer';
export const FLEET_CLOUD_SECURITY_POSTURE_PACKAGE = 'cloud_security_posture';
export const FLEET_CLOUD_SECURITY_POSTURE_KSPM_POLICY_TEMPLATE = 'kspm';
export const FLEET_CLOUD_DEFEND_PACKAGE = 'cloud_defend';

export const PACKAGE_TEMPLATE_SUFFIX = '@package';
export const USER_SETTINGS_TEMPLATE_SUFFIX = '@custom';
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/fleet/common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export {
FLEET_KUBERNETES_PACKAGE,
FLEET_CLOUD_SECURITY_POSTURE_PACKAGE,
FLEET_CLOUD_SECURITY_POSTURE_KSPM_POLICY_TEMPLATE,
FLEET_CLOUD_DEFEND_PACKAGE,
FLEET_ENDPOINT_PACKAGE,
// Saved object type
AGENT_POLICY_SAVED_OBJECT_TYPE,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ import {
FLEET_KUBERNETES_PACKAGE,
FLEET_CLOUD_SECURITY_POSTURE_PACKAGE,
FLEET_CLOUD_SECURITY_POSTURE_KSPM_POLICY_TEMPLATE,
FLEET_CLOUD_DEFEND_PACKAGE,
} from '../../../common';

import type { K8sMode } from './types';

// Packages that requires custom elastic-agent manifest
const K8S_PACKAGES = new Set([FLEET_KUBERNETES_PACKAGE]);
const K8S_PACKAGES = new Set([FLEET_KUBERNETES_PACKAGE, FLEET_CLOUD_DEFEND_PACKAGE]);

export function useAgentPolicyWithPackagePolicies(policyId?: string) {
const [agentPolicyWithPackagePolicies, setAgentPolicy] = useState<AgentPolicy | null>(null);
Expand Down

0 comments on commit 7a824c8

Please sign in to comment.